From f7ec30a586f9378adb2fdf25cc73cf749c51a498 Mon Sep 17 00:00:00 2001 From: Philippe Rigovanov Date: Mon, 23 Jun 2014 01:55:45 +0400 Subject: [PATCH 01/49] Update ru.coffee --- app/locale/ru.coffee | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 7d1b28701..829df6a88 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -219,8 +219,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # next_links: "add any personal or social links." # next_photo: "add an optional professional photo." # next_active: "mark yourself open to offers to show up in searches." -# example_blog: "Blog" -# example_personal_site: "Personal Site" + example_blog: "Блог" + example_personal_site: "Персональный сайт" # links_header: "Personal Links" # links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog." # links_name: "Link Name" @@ -231,16 +231,16 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # basics_active_help: "Want interview offers right now?" # basics_job_title: "Desired Job Title" # basics_job_title_help: "What role are you looking for?" -# basics_city: "City" + basics_city: "Город" # basics_city_help: "City you want to work in (or live in now)." -# basics_country: "Country" + basics_country: "Страна" # basics_country_help: "Country you want to work in (or live in now)." # basics_visa: "US Work Status" # basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?" # basics_looking_for: "Looking For" -# basics_looking_for_full_time: "Full-time" -# basics_looking_for_part_time: "Part-time" -# basics_looking_for_remote: "Remote" + basics_looking_for_full_time: "Полная занятость" + basics_looking_for_part_time: "Частичная занятость" + basics_looking_for_remote: "Удаленная работа" # basics_looking_for_contracting: "Contracting" # basics_looking_for_internship: "Internship" # basics_looking_for_help: "What kind of developer position do you want?" @@ -266,9 +266,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # work_employer_help: "Name of your employer." # work_role: "Job Title" # work_role_help: "What was your job title or role?" -# work_duration: "Duration" + work_duration: "Продолжительность" # work_duration_help: "When did you hold this gig?" -# work_description: "Description" + work_description: "Описание" # work_description_help: "What did you do there? (140 chars; optional)" education: "Образование" # education_header: "Recount your academic ordeals" @@ -279,21 +279,21 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # education_degree_help: "What was your degree and field of study?" # education_duration: "Dates" # education_duration_help: "When?" -# education_description: "Description" + education_description: "Описание" # education_description_help: "Highlight anything about this educational experience. (140 chars; optional)" our_notes: "Наши заметки" projects: "Проекты" -# projects_header: "Add 3 projects" -# projects_header_2: "Projects (Top 3)" + projects_header: "Добавьте 3 проекта" + projects_header_2: "Проекты (3 самых лучших)" # projects_blurb: "Highlight your projects to amaze employers." -# project_name: "Project Name" + project_name: "Название Проекта" # project_name_help: "What was the project called?" -# project_description: "Description" + project_description: "Описание" # project_description_help: "Briefly describe the project." # project_picture: "Picture" # project_picture_help: "Upload a 230x115px or larger image showing off the project." -# project_link: "Link" -# project_link_help: "Link to the project." + project_link: "Ссылка" + project_link_help: "Ссылка на проект." # player_code: "Player Code" employers: @@ -302,7 +302,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # 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_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: "Как Мы Находим Разработчиков?" # 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_blurb_1: "We will save you time. Every CodeCombateer we feaure is " @@ -433,12 +433,12 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi cast_spell: "Произнести текущее заклинание." # continue_script: "Continue past current script." # skip_scripts: "Skip past all skippable scripts." -# toggle_playback: "Toggle play/pause." -# scrub_playback: "Scrub back and forward through time." + toggle_playback: "Включить проигрывание/паузу." + scrub_playback: "Перемотка назад и вперед во времени." # single_scrub_playback: "Scrub back and forward through time by a single frame." # scrub_execution: "Scrub through current spell execution." -# toggle_debug: "Toggle debug display." -# toggle_grid: "Toggle grid overlay." + toggle_debug: "Включить отображение отладки." + toggle_grid: "Включить наложение сетки." # toggle_pathfinding: "Toggle pathfinding overlay." # beautify: "Beautify your code by standardizing its formatting." # move_wizard: "Move your Wizard around the level." @@ -448,7 +448,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi av_entities_sub_title: "Сущности" av_entities_users_url: "Пользователи" av_entities_active_instances_url: "Активные экземпляры" -# av_entities_employer_list_url: "Employer List" + av_entities_employer_list_url: "Список работодателей" av_other_sub_title: "Другое" av_other_debug_base_url: "База (для отладки base.jade)" u_title: "Список пользователей" @@ -514,9 +514,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi new_article_title: "Создать новую статью" new_thang_title: "Создать новый тип объектов" new_level_title: "Создать новый уровень" -# new_article_title_login: "Log In to Create a New Article" + new_article_title_login: "Войти чтобы создать новую статью" # new_thang_title_login: "Log In to Create a New Thang Type" -# new_level_title_login: "Log In to Create a New Level" + new_level_title_login: "Войти чтобы создать новый уровень" # new_achievement_title: "Create a New Achievement" # new_achievement_title_login: "Log In to Create a New Achievement" article_search_title: "Искать статьи" @@ -815,8 +815,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # prizes: "Prizes" # total_value: "Total Value" # in_cash: "in cash" -# custom_wizard: "Custom CodeCombat Wizard" -# custom_avatar: "Custom CodeCombat avatar" + custom_wizard: "Изменить CodeCombat волшебника" + custom_avatar: "Изменить CodeCombat аватар" # heap: "for six months of \"Startup\" access" # credits: "credits" # one_month_coupon: "coupon: choose either Rails or HTML" @@ -873,7 +873,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # thangs: "Thangs" # level_session: "Your Session" # opponent_session: "Opponent Session" -# article: "Article" + article: "Статья" # user_names: "User Names" # thang_names: "Thang Names" files: "Файлы" From 1fee6c7186ea567c1801ddd2a262a30ce52fca10 Mon Sep 17 00:00:00 2001 From: Philippe Rigovanov Date: Mon, 23 Jun 2014 02:10:40 +0400 Subject: [PATCH 02/49] Update server.coffee Removed unnecessary return statement in server.coffee. Functions will always return their final value. --- server.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.coffee b/server.coffee index 6021f2865..c59890489 100644 --- a/server.coffee +++ b/server.coffee @@ -12,7 +12,7 @@ module.exports.startServer = -> app = createAndConfigureApp() http.createServer(app).listen(app.get('port')) log.info("Express SSL server listening on port " + app.get('port')) - return app + app createAndConfigureApp = -> serverSetup.setupLogging() From f2898e3bc0291c139cb059e096cd36956f0cc8d4 Mon Sep 17 00:00:00 2001 From: Philippe Rigovanov Date: Thu, 26 Jun 2014 00:56:41 +0400 Subject: [PATCH 03/49] Update diplomat.jade added myself to diplomats --- app/templates/contribute/diplomat.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/contribute/diplomat.jade b/app/templates/contribute/diplomat.jade index 845da167d..e2e6a756c 100644 --- a/app/templates/contribute/diplomat.jade +++ b/app/templates/contribute/diplomat.jade @@ -72,7 +72,7 @@ block content li Slovak - Anon li Persian - Reza Habibi (Rehb) li Czech - vanous - li Russian - fess89, ser-storchak, Mr A + li Russian - fess89, ser-storchak, Mr A, a1ip li Ukrainian - fess89 li Italian - flauta li Norwegian - bardeh From e138d2eed61ae264264e0601f7ce282834dccd2d Mon Sep 17 00:00:00 2001 From: Philippe Rigovanov Date: Fri, 27 Jun 2014 04:11:46 +0400 Subject: [PATCH 04/49] Update ru.coffee With fixes from [M-r-A](https://github.com/M-r-A) --- app/locale/ru.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 829df6a88..894370bf9 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -286,7 +286,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi projects_header: "Добавьте 3 проекта" projects_header_2: "Проекты (3 самых лучших)" # projects_blurb: "Highlight your projects to amaze employers." - project_name: "Название Проекта" + project_name: "Название проекта" # project_name_help: "What was the project called?" project_description: "Описание" # project_description_help: "Briefly describe the project." @@ -302,7 +302,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # 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_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: "Как мы находим разработчиков?" # 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_blurb_1: "We will save you time. Every CodeCombateer we feaure is " @@ -433,7 +433,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi cast_spell: "Произнести текущее заклинание." # continue_script: "Continue past current script." # skip_scripts: "Skip past all skippable scripts." - toggle_playback: "Включить проигрывание/паузу." + toggle_playback: "Переключить проигрывание/паузу." scrub_playback: "Перемотка назад и вперед во времени." # single_scrub_playback: "Scrub back and forward through time by a single frame." # scrub_execution: "Scrub through current spell execution." @@ -514,7 +514,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi new_article_title: "Создать новую статью" new_thang_title: "Создать новый тип объектов" new_level_title: "Создать новый уровень" - new_article_title_login: "Войти чтобы создать новую статью" + new_article_title_login: "Войти, чтобы создать новую статью" # new_thang_title_login: "Log In to Create a New Thang Type" new_level_title_login: "Войти чтобы создать новый уровень" # new_achievement_title: "Create a New Achievement" @@ -815,8 +815,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # prizes: "Prizes" # total_value: "Total Value" # in_cash: "in cash" - custom_wizard: "Изменить CodeCombat волшебника" - custom_avatar: "Изменить CodeCombat аватар" + custom_wizard: "Изменить волшебника CodeCombat" + custom_avatar: "Изменить аватар CodeCombat" # heap: "for six months of \"Startup\" access" # credits: "credits" # one_month_coupon: "coupon: choose either Rails or HTML" From dd6209cd998524db524790c1e7d41755e366a888 Mon Sep 17 00:00:00 2001 From: Philippe Rigovanov Date: Fri, 27 Jun 2014 04:33:05 +0400 Subject: [PATCH 05/49] Update ru.coffee With @M-r-A fixes --- app/locale/ru.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 894370bf9..1305e22b1 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -264,7 +264,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # work_blurb: "List your relevant work experience, most recent first." # work_employer: "Employer" # work_employer_help: "Name of your employer." -# work_role: "Job Title" + work_role: "Должность" # work_role_help: "What was your job title or role?" work_duration: "Продолжительность" # work_duration_help: "When did you hold this gig?" @@ -275,7 +275,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # education_blurb: "List your academic ordeals." # education_school: "School" # education_school_help: "Name of your school." -# education_degree: "Degree" + education_degree: "Степень" # education_degree_help: "What was your degree and field of study?" # education_duration: "Dates" # education_duration_help: "When?" @@ -871,7 +871,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi components: "Компоненты" # thang: "Thang" # thangs: "Thangs" -# level_session: "Your Session" + level_session: "Ваша сессия" # opponent_session: "Opponent Session" article: "Статья" # user_names: "User Names" From 08a9b4f05b558b86c7de7b0e57c02f6e9ddb0c52 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Thu, 3 Jul 2014 13:55:50 +0100 Subject: [PATCH 06/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 82293b01e..1c1a905b1 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -3,37 +3,37 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P loading: "A carregar..." saving: "A guardar..." sending: "A enviar..." -# send: "Send" + send: "Enviar" cancel: "Cancelar" save: "Guardar" -# publish: "Publish" - create: "Create" + publish: "Publicar" + create: "Criar" delay_1_sec: "1 segundo" delay_3_sec: "3 segundos" delay_5_sec: "5 segundos" manual: "Manual" - fork: "Fork" +# fork: "Fork" play: "Jogar" -# retry: "Retry" -# watch: "Watch" -# unwatch: "Unwatch" -# submit_patch: "Submit Patch" + retry: "Tentar novamente" +# watch: "Watch" +# unwatch: "Unwatch" +# submit_patch: "Submit Patch" -# units: -# second: "second" -# seconds: "seconds" -# minute: "minute" -# minutes: "minutes" -# hour: "hour" -# hours: "hours" -# day: "day" -# days: "days" -# week: "week" -# weeks: "weeks" -# month: "month" -# months: "months" -# year: "year" -# years: "years" + units: +# second: "second" +# seconds: "seconds" +# minute: "minute" +# minutes: "minutes" +# hour: "hour" +# hours: "hours" +# day: "day" +# days: "days" +# week: "week" +# weeks: "weeks" +# month: "month" +# months: "months" +# year: "year" +# years: "years" modal: close: "Fechar" From 3b04343034ed04ffde4b69c99f682331eec1ff58 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Thu, 3 Jul 2014 14:06:40 +0100 Subject: [PATCH 07/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 1c1a905b1..db9a8fe60 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -20,20 +20,20 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # submit_patch: "Submit Patch" units: -# second: "second" -# seconds: "seconds" -# minute: "minute" -# minutes: "minutes" -# hour: "hour" -# hours: "hours" -# day: "day" -# days: "days" -# week: "week" -# weeks: "weeks" -# month: "month" -# months: "months" -# year: "year" -# years: "years" + second: "segundo" + seconds: "segundos" + minute: "minuto" + minutes: "minutos" + hour: "hora" + hours: "horas" + day: "dia" + days: "dias" + week: "semana" + weeks: "semanas" + month: "mês" + months: "meses" + year: "ano" + years: "anos" modal: close: "Fechar" @@ -43,42 +43,42 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P page_not_found: "Página não encontrada" nav: - play: "Jogar" -# community: "Community" + play: "Níveis" + community: "Comunidade" editor: "Editor" blog: "Blog" forum: "Fórum" -# account: "Account" + account: "Conta" admin: "Administrador" home: "Início" contribute: "Contribuir" legal: "Legal" about: "Sobre" - contact: "Contacto" + contact: "Contacte" twitter_follow: "Seguir" employers: "Patrões" versions: save_version_title: "Guardar Nova Versão" 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_suffix: "." cla_agree: "EU CONCORDO" login: - sign_up: "Criar conta" - log_in: "Iniciar sessão" -# logging_in: "Logging In" + sign_up: "Criar Conta" + log_in: "Iniciar Sessão" + logging_in: "A Iniciar Sessão" log_out: "Sair" recover: "recuperar conta" recover: - recover_account_title: "Recuperar conta" - send_password: "Recuperar password" + recover_account_title: "Recuperar Conta" + send_password: "Enviar Password de Recuperação" signup: - create_account_title: "Cria uma conta para guardar o teu progresso." +# create_account_title: "Create Account to Save Progress" description: "É grátis. Só precisamos de umas coisas e fica tudo pronto:" email_announcements: "Receber anúncios por e-mail" coppa: "13+ ou não-EUA " From dbdd8c672cac82d4d310c96876bc4221d1a65138 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Thu, 3 Jul 2014 14:11:30 +0100 Subject: [PATCH 08/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index db9a8fe60..e268a325c 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -78,7 +78,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P send_password: "Enviar Password de Recuperação" signup: -# create_account_title: "Create Account to Save Progress" + create_account_title: "Criar uma conta para guardar o teu progresso" description: "É grátis. Só precisamos de umas coisas e fica tudo pronto:" email_announcements: "Receber anúncios por e-mail" coppa: "13+ ou não-EUA " From b5ef1742f45897a2ba66d3e9b0ee1dfa706b1f6c Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sat, 5 Jul 2014 19:11:06 +0100 Subject: [PATCH 09/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index e268a325c..4f9bd57cc 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -78,53 +78,53 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P send_password: "Enviar Password de Recuperação" signup: - create_account_title: "Criar uma conta para guardar o teu progresso" - description: "É grátis. Só precisamos de umas coisas e fica tudo pronto:" + create_account_title: "Criar Conta para Guardar Progresso" + description: "É grátis. Só são necessárias umas coisas e fica tudo pronto:" email_announcements: "Receber anúncios por e-mail" coppa: "13+ ou não-EUA " coppa_why: "(Porquê?)" - creating: "A criar conta..." + creating: "A Criar Conta..." sign_up: "Registar" log_in: "iniciar sessão com palavra-passe" -# social_signup: "Or, you can sign up through Facebook or G+:" -# required: "You need to log in before you can go that way." + social_signup: "Ou pode registar-se através do Facebook ou do Google+:" + required: "Precisa de iniciar sessão antes de prosseguir dessa forma." home: slogan: "Aprende a Programar ao Jogar um Jogo" - no_ie: "O CodeCombat não corre em Internet Explorer 9 ou anterior. Desculpa!" - no_mobile: "O CodeCombat não foi desenhado para dispositivos móveis e pode não funcionar!" + no_ie: "O CodeCombat não funciona no Internet Explorer 9 ou anterior. Desculpe!" + no_mobile: "O CodeCombat não foi feito para dispositivos móveis e pode não funcionar!" play: "Jogar" - old_browser: "Ups, o teu browser é demasiado antigo para correr o CodeCombat. Desculpa!" - old_browser_suffix: "Mesmo assim podes tentar, mas provavelmente não vai funcionar." + old_browser: "Ups, o seu navegador é demasiado antigo para que o CodeCombat funcione. Desculpe!" + old_browser_suffix: "Mesmo assim pode tentar, mas provavelmente não irá funcionar." campaign: "Campanha" for_beginners: "Para Iniciantes" - multiplayer: "Multiplayer" + multiplayer: "Multijogador" for_developers: "Para Programadores" play: - choose_your_level: "Escolhe o Teu Nível" - adventurer_prefix: "Podes saltar para um dos níveis abaixo, ou discutir os níveis " - adventurer_forum: "no fórum de Aventureiro" + choose_your_level: "Escolha o Seu Nível" + adventurer_prefix: "Pode saltar para um dos níveis abaixo, ou discutir os níveis no " + adventurer_forum: "fórum do Aventureiro" adventurer_suffix: "." campaign_beginner: "Campanha para Iniciantes" - campaign_beginner_description: "... onde aprendes a feitiçaria da programação." - campaign_dev: "Níveis mais Difíceis" - campaign_dev_description: "... onde aprendes a interface enquanto fazes coisas um bocadinho mais difíceis." + campaign_beginner_description: "... onde aprende a feitiçaria da programação." + campaign_dev: "Níveis mais Difíceis Aleatórios" + campaign_dev_description: "... onde aprende a interface enquanto faz coisas um bocadinho mais difíceis." 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_description: "... onde combates contra a criatividade dos teus colegas Feiticeiros Artesãos." + campaign_player_created_description: "... onde combate contra a criatividade dos seus colegas Feiticeiros Artesãos." level_difficulty: "Dificuldade: " - play_as: "Jogar como " + play_as: "Jogar Como" spectate: "Observar" contact: - contact_us: "Contactar o CodeCombat" - welcome: "É bom ter notícias tuas! Usa este formulário para nos enviares um e-mail." - contribute_prefix: "Se estás interessado em contribuir, dá uma olhadela à nossa " + contact_us: "Contacte o CodeCombat" + welcome: "É bom ter notícias suas! Use este formulário para nos enviar um e-mail. " + contribute_prefix: "Se está interessado em contribuir, dê uma olhadela à nossa " contribute_page: "página de contribuição" 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_suffix: " como alternativa." send: "Enviar Feedback" @@ -132,42 +132,42 @@ 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." diplomat_suggestion: - title: "Ajuda a traduzir o CodeCombat!" - sub_heading: "Precisamos das tuas 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." - 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." - learn_more: "Sabe mais sobre ser um Diplomata" - subscribe_as_diplomat: "Subscrever como Diplomata" + title: "Ajude a traduzir o CodeCombat!" + 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 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 conseguirmos traduzir tudo para Português, irá ver em Inglês o que não estiver disponível em Português." + learn_more: "Saiba mais sobre ser um Diplomata" + subscribe_as_diplomat: "Subscreva-se como Diplomata" wizard_settings: - title: "Definições do Wizard" - customize_avatar: "Altera o teu Avatar" -# active: "Active" -# color: "Color" -# group: "Group" + title: "Definições do Feiticeiro" + customize_avatar: "Personalize o Seu Avatar" + active: "Ativo" + color: "Cor" + group: "Grupo" clothes: "Roupas" trim: "Pormenores" cloud: "Nuvem" -# team: "Team" + team: "Equipa" spell: "Feitiço" boots: "Botas" - hue: "Matiz" + hue: "Tom" saturation: "Saturação" lightness: "Brilho" account_settings: title: "Definições da Conta" - not_logged_in: "Inicia sessão ou cria uma conta para alterares as tuas definições." - autosave: "As alterações guardam-se automaticamente" + not_logged_in: "Inicie sessão ou crie uma conta para alterar as suas definições." + autosave: "Alterações Guardam Automaticamente" me_tab: "Eu" picture_tab: "Fotografia" -# upload_picture: "Upload a picture" + upload_picture: "Anexar uma fotografia" wizard_tab: "Feiticeiro" password_tab: "Palavra-passe" emails_tab: "E-mails" - admin: "Admin" - wizard_color: "Cor das roupas do feiticeiro" - new_password: "Nova palavra-passe" + admin: "Administrador" + wizard_color: "Cor das Roupas do Feiticeiro" + new_password: "Nova Palavra-passe" new_password_verify: "Verificar" email_subscriptions: "Subscrições de E-mail" email_announcements: "Anúncios" From cc8fec92831a7119b49774af3aea5e8f44d4d74d Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sat, 5 Jul 2014 19:11:58 +0100 Subject: [PATCH 10/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 4f9bd57cc..dc5b0cfdf 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -17,7 +17,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P retry: "Tentar novamente" # watch: "Watch" # unwatch: "Unwatch" -# submit_patch: "Submit Patch" + submit_patch: "Submeter Versão" units: second: "segundo" From 183b744d078e27eac029e260491d9ebc5ebad638 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sat, 5 Jul 2014 22:10:21 +0100 Subject: [PATCH 11/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index dc5b0cfdf..5af00744f 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -56,7 +56,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P about: "Sobre" contact: "Contacte" twitter_follow: "Seguir" - employers: "Patrões" + employers: "Empregadores" versions: save_version_title: "Guardar Nova Versão" From e3bb93c4f57f6c0b9c48299e62deddbb17c6fcda Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sun, 6 Jul 2014 10:01:55 +0100 Subject: [PATCH 12/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 80 ++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 5af00744f..6905f574f 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -103,7 +103,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P play: choose_your_level: "Escolha o Seu Nível" - adventurer_prefix: "Pode saltar para um dos níveis abaixo, ou discutir os níveis no " + adventurer_prefix: "Pode saltar para um dos níveis abaixo ou discutir os níveis no " adventurer_forum: "fórum do Aventureiro" adventurer_suffix: "." campaign_beginner: "Campanha para Iniciantes" @@ -171,32 +171,32 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P new_password_verify: "Verificar" email_subscriptions: "Subscrições de E-mail" 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_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." -# email_any_notes: "Any Notifications" -# email_any_notes_description: "Disable to stop all activity notification emails." -# email_recruit_notes: "Job Opportunities" -# email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job." - contributor_emails: "E-mails para Contribuintes" + email_any_notes: "Quaisquer Notificações" + email_any_notes_description: "Desative para parar de receber todos os e-mails de notificação de atividade." + email_recruit_notes: "Oportunidades de Emprego" + email_recruit_notes_description: "Se joga muito bem, podemos contactá-lo para lhe arranjar um (melhor) emprego." + contributor_emails: "Subscrições de E-mail (Contribuintes)" contribute_prefix: "Estamos à procura de pessoas para se juntarem a nós! Visita a " contribute_page: "página de contribuição" - contribute_suffix: " para mais informação." - email_toggle: "Alternar todos" - error_saving: "Erro ao guardar" - saved: "Alterações guardadas" + contribute_suffix: " para mais informações." + email_toggle: "Alternar Todos" + error_saving: "Erro ao Guardar" + saved: "Alterações Guardadas" password_mismatch: "As palavras-passe não coincidem." -# job_profile: "Job Profile" -# 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_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job." -# sample_profile: "See a sample profile" -# view_profile: "View Your Profile" + job_profile: "Perfil de Emprego" + 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: "Olá! Preencha isto e entraremos em contacto consigo sobre encontrar um emprego de desenvolvedor de software para si." + sample_profile: "Veja um exemplo de perfil" + view_profile: "Veja o Seu Perfil" account_profile: -# settings: "Settings" -# edit_profile: "Edit Profile" -# done_editing: "Done Editing" - profile_for_prefix: "Perfil de " + settings: "Definições" + edit_profile: "Editar Perfil" + done_editing: "Concluir a Edição" + profile_for_prefix: "Perfil para " profile_for_suffix: "" # featured: "Featured" # not_featured: "Not Featured" @@ -282,6 +282,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # education_description: "Description" # education_description_help: "Highlight anything about this educational experience. (140 chars; optional)" # our_notes: "Our Notes" +# remarks: "Remarks" # projects: "Projects" # projects_header: "Add 3 projects" # 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." # player_code: "Player Code" -# employers: -# want_to_hire_our_players: "Hire CodeCombat Players" -# what: "What is CodeCombat?" + employers: + want_to_hire_our_players: "Contratar Jogadores do 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." -# 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." -# 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." -# 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 " +# 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_3: ", has " # why_blurb_4: "demonstrated top notch technical skills" # why_blurb_5: ", and has been " # why_blurb_6: "personally screened by us" # why_blurb_7: ". Stop screening and start hiring." -# see_candidates: "Click here to see our candidates" -# candidate_name: "Name" -# candidate_location: "Location" -# candidate_looking_for: "Looking For" -# candidate_role: "Role" -# candidate_top_skills: "Top Skills" -# candidate_years_experience: "Yrs Exp" -# candidate_last_updated: "Last Updated" -# featured_developers: "Featured Developers" -# other_developers: "Other Developers" -# inactive_developers: "Inactive Developers" + see_candidates: "Clique aqui para ver os nossos candidatos" + candidate_name: "Nome" + candidate_location: "Localização" + candidate_looking_for: "À Procura de" + candidate_role: "Cargo" + candidate_top_skills: "Principais Habilidades" + candidate_years_experience: "Anos de Experiência" + candidate_last_updated: "Última Vez Atualizado" + candidate_who: "Quem" + featured_developers: "Desenvolvedores em Destaque" + other_developers: "Outros Desenvolvedores" + inactive_developers: "Desenvolvedores Inativos" play_level: done: "Concluir" From 21c180e2060b7c6d4f3f514ed474b2b248ccdc8f Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sun, 6 Jul 2014 11:11:44 +0100 Subject: [PATCH 13/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 6905f574f..9b6321e6d 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -116,7 +116,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P campaign_player_created_description: "... onde combate contra a criatividade dos seus colegas Feiticeiros Artesãos." level_difficulty: "Dificuldade: " play_as: "Jogar Como" - spectate: "Observar" + spectate: "Espectar" contact: contact_us: "Contacte o CodeCombat" From cc0e81882499591b2fca8f1cf6a3fe6d402306a2 Mon Sep 17 00:00:00 2001 From: Inez KEMENES Date: Sun, 6 Jul 2014 16:26:51 +0200 Subject: [PATCH 14/49] Update hu.coffee --- app/locale/hu.coffee | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/locale/hu.coffee b/app/locale/hu.coffee index 24c6fe62a..f84949111 100644 --- a/app/locale/hu.coffee +++ b/app/locale/hu.coffee @@ -187,13 +187,13 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t saved: "Változtatások elmentve" password_mismatch: "A jelszavak nem egyeznek." job_profile: "Munkaköri leírás" - job_profile_approved: "Munkaköri leírásodat a Codecombat jóváhagyta. Munkaadók mindaddig láthatják, amíg meg nem jelölöd inaktíként, vagy négy hétig,ha addig nem kerül megváltoztatásra." + job_profile_approved: "Munkaköri leírásodat a Codecombat jóváhagyta. Munkaadók mindaddig láthatják, amíg meg nem jelölöd inaktívként, vagy négy hétig, ha addig nem kerül megváltoztatásra." job_profile_explanation: "Szió! Töltsd ki ezt és majd kapcsolatba lépünk veled és keresünk neked egy szoftware fejlesztői állást." sample_profile: "Nézz meg egy mintaprofilt!" view_profile: "Nézd meg a profilodat!" account_profile: -# settings: "Settings" + settings: "Beállítások" edit_profile: "Szerkeszd meg a profilodat" done_editing: "Szerkesztés kész" profile_for_prefix: "Profil " @@ -205,10 +205,10 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t contact: "Kapcsolat" active: "Azonnali interjú ajánlatokat keresek" inactive: "Most éppen nem keresek interjú ajánlatokat" -# complete: "complete" + complete: "befejezve" next: "Következő" next_city: "Város?" -# next_country: "pick your country." + next_country: "válaszd ki az országot." next_name: "Név?" next_short_description: "adj egy rövid leírást." # next_long_description: "describe your desired position." @@ -231,16 +231,16 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t # basics_active_help: "Want interview offers right now?" # basics_job_title: "Desired Job Title" # basics_job_title_help: "What role are you looking for?" -# basics_city: "City" -# basics_city_help: "City you want to work in (or live in now)." -# basics_country: "Country" + basics_city: "Város" + basics_city_help: "A város, ahol dolgozni akarsz (vagy ahol élsz)" + basics_country: "Ország" # basics_country_help: "Country you want to work in (or live in now)." # basics_visa: "US Work Status" # basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?" # basics_looking_for: "Looking For" -# basics_looking_for_full_time: "Full-time" -# basics_looking_for_part_time: "Part-time" -# basics_looking_for_remote: "Remote" + basics_looking_for_full_time: "Teljes munkaidőben" + basics_looking_for_part_time: "Részmunkaidőben" + basics_looking_for_remote: "Távmunkában" # basics_looking_for_contracting: "Contracting" # basics_looking_for_internship: "Internship" # basics_looking_for_help: "What kind of developer position do you want?" From 1f02b999426c1f732f0981cf4840baaf90daee49 Mon Sep 17 00:00:00 2001 From: Ruben Vereecken Date: Sun, 6 Jul 2014 20:01:47 +0200 Subject: [PATCH 15/49] Refactored showNotFound into notFoundView --- app/lib/Router.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/lib/Router.coffee b/app/lib/Router.coffee index 357c56ddc..02d7432b9 100644 --- a/app/lib/Router.coffee +++ b/app/lib/Router.coffee @@ -44,7 +44,7 @@ module.exports = class CocoRouter extends Backbone.Router return @openRoute(args.join('/')) view = new ViewClass({}, slugOrId) view.render() - if view then @openView(view) else @showNotFound() + @openView if view then view else @notFoundView() cache: {} openRoute: (route) -> @@ -99,7 +99,7 @@ module.exports = class CocoRouter extends Backbone.Router return document.location.reload() path = "views/#{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.render() @openView(view) @@ -117,7 +117,7 @@ module.exports = class CocoRouter extends Backbone.Router break if ViewClass split -= 1 - return @showNotFound() if not ViewClass + return @notFoundView() if not ViewClass args = pieces[split+1..] view = new ViewClass({}, args...) # options, then any path fragment args view.render() @@ -129,7 +129,7 @@ module.exports = class CocoRouter extends Backbone.Router if error.toString().search('Cannot find module "' + path + '" from') is -1 throw error - showNotFound: -> + notFoundView: -> NotFoundView = require('views/not_found') view = new NotFoundView() view.render() From 128008daa159aeb7e5f9e2669a8814bac9d7e931 Mon Sep 17 00:00:00 2001 From: Ruben Vereecken Date: Sun, 6 Jul 2014 21:48:31 +0200 Subject: [PATCH 16/49] Hid the progress bar on load failed --- app/views/kinds/CocoView.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/kinds/CocoView.coffee b/app/views/kinds/CocoView.coffee index 541d02657..21b432dd7 100644 --- a/app/views/kinds/CocoView.coffee +++ b/app/views/kinds/CocoView.coffee @@ -137,12 +137,14 @@ module.exports = class CocoView extends Backbone.View resourceIndex: r.rid, responseText: r.jqxhr?.responseText })).i18n() + @$el.find('.progress').hide() onRetryResource: (e) -> res = @supermodel.getResource($(e.target).data('resource-index')) # different views may respond to this call, and not all have the resource to reload return unless res and res.isFailed res.load() + @$el.find('.progress').show() $(e.target).closest('.loading-error-alert').remove() # Modals From d9d1d25c3c70fe31c32715e6ec236ab06c7151d3 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Mon, 7 Jul 2014 13:31:03 +0100 Subject: [PATCH 17/49] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 9b6321e6d..70e69d186 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -90,7 +90,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P required: "Precisa de iniciar sessão antes de prosseguir dessa forma." home: - slogan: "Aprende a Programar ao Jogar um Jogo" + slogan: "Aprenda a Programar ao Jogar um Jogo" no_ie: "O CodeCombat não funciona no Internet Explorer 9 ou anterior. Desculpe!" no_mobile: "O CodeCombat não foi feito para dispositivos móveis e pode não funcionar!" play: "Jogar" From b76239b4e9e1c78821da0bde21d1feb7a2b5ec88 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 10:29:34 -0700 Subject: [PATCH 18/49] Replaced candidate avatars on employer page --- app/models/User.coffee | 4 ++-- app/templates/employers.jade | 2 +- server/users/user_handler.coffee | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/User.coffee b/app/models/User.coffee index 9766a85aa..1086e1373 100644 --- a/app/models/User.coffee +++ b/app/models/User.coffee @@ -21,14 +21,14 @@ module.exports = class User extends CocoModel lang: -> @get('preferredLanguage') or 'en-US' - getPhotoURL: (size=80, useJobProfilePhoto=false) -> + getPhotoURL: (size=80, useJobProfilePhoto=false, useEmployerPageAvatar=false) -> photoURL = if useJobProfilePhoto then @get('jobProfile')?.photoURL else null photoURL ||= @get('photoURL') if photoURL prefix = if photoURL.search(/\?/) is -1 then '?' else '&' return "#{photoURL}#{prefix}s=#{size}" if photoURL.search('http') isnt -1 # legacy return "/file/#{photoURL}#{prefix}s=#{size}" - return "/db/user/#{@id}/avatar?s=#{size}" + return "/db/user/#{@id}/avatar?s=#{size}&employerPageAvatar=#{useEmployerPageAvatar}" @getByID = (id, properties, force) -> {me} = require 'lib/auth' diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 243d3998a..790058be5 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -112,7 +112,7 @@ block content tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") td(rowspan=2) .candidate-picture - img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, width=50) + img(src=candidate.getPhotoURL(50,false,true), alt=profile.name, title=profile.name, width=50) if curated && curated.shortDescription td.candidate-description #{curated.shortDescription} else diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index ac43fda1c..f8b608255 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -221,6 +221,8 @@ UserHandler = class UserHandler extends Handler photoURL = document?.get('photoURL') if photoURL photoURL = "/file/#{photoURL}" + else if req.query.employerPageAvatar is "true" + photoURL = @buildGravatarURL document, req.query.s, "/images/pages/employer/anon_user.png" else photoURL = @buildGravatarURL document, req.query.s, req.query.fallback res.redirect photoURL From 03053745804419dc6a17375810b410a7d288fbe8 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 10:42:16 -0700 Subject: [PATCH 19/49] Add featured field to curation --- app/schemas/models/user.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index a144494e1..b85d9f2bd 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -147,6 +147,10 @@ UserSchema = c.object {}, title: 'Seniority' type: 'string' enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] + featured: + title: 'Featured' + type: 'boolean' + description: 'Should this candidate be prominently featured on the site?' jobProfileApproved: {title: 'Job Profile Approved', type: 'boolean', description: 'Whether your profile has been approved by CodeCombat.'} jobProfileNotes: {type: 'string', maxLength: 1000, title: 'Our Notes', description: 'CodeCombat\'s notes on the candidate.', format: 'markdown', default: ''} employerAt: c.shortString {description: 'If given employer permissions to view job candidates, for which employer?'} From 02890d5a6da009f81fa421eeba4e32fb88f73f49 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 14:22:11 -0700 Subject: [PATCH 20/49] Enabled edits to components by non-admins (creation is still off limits). --- server/levels/components/level_component_handler.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/levels/components/level_component_handler.coffee b/server/levels/components/level_component_handler.coffee index 810fa3e86..889619d8d 100644 --- a/server/levels/components/level_component_handler.coffee +++ b/server/levels/components/level_component_handler.coffee @@ -22,7 +22,7 @@ LevelComponentHandler = class LevelComponentHandler extends Handler props hasAccess: (req) -> - req.method is 'GET' or req.user?.isAdmin() + req.method in ['GET', 'PUT'] or req.user?.isAdmin() module.exports = new LevelComponentHandler() From 2a309c149ce896a5fe3674201e8240fdb8459bc1 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 15:19:22 -0700 Subject: [PATCH 21/49] Enabled submitting patches for thangs and articles. --- app/templates/editor/article/edit.jade | 3 +++ app/views/editor/article/edit.coffee | 8 +++++--- app/views/editor/thang/edit.coffee | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/templates/editor/article/edit.jade b/app/templates/editor/article/edit.jade index d61460e60..f882cea08 100644 --- a/app/templates/editor/article/edit.jade +++ b/app/templates/editor/article/edit.jade @@ -23,6 +23,9 @@ block content #article-view + h3 Patches + .patches-view + hr div#error-view diff --git a/app/views/editor/article/edit.coffee b/app/views/editor/article/edit.coffee index 1511ba155..ae9083a2a 100644 --- a/app/views/editor/article/edit.coffee +++ b/app/views/editor/article/edit.coffee @@ -1,9 +1,9 @@ View = require 'views/kinds/RootView' VersionHistoryView = require './versions_view' -ErrorView = require '../../error_view' template = require 'templates/editor/article/edit' Article = require 'models/Article' SaveVersionModal = require 'views/modal/save_version_modal' +PatchesView = require 'views/editor/patches_view' module.exports = class ArticleEditView extends View id: 'editor-article-edit-view' @@ -37,7 +37,7 @@ module.exports = class ArticleEditView extends View @article.fetch() @listenToOnce(@article, 'sync', @buildTreema) @pushChangesToPreview = _.throttle(@pushChangesToPreview, 500) - + buildTreema: -> return if @treema? or (not @article.loaded) unless @article.attributes.body @@ -68,13 +68,15 @@ module.exports = class ArticleEditView extends View getRenderData: (context={}) -> context = super(context) context.article = @article - context.authorized = me.isAdmin() or @article.hasWriteAccess(me) + context.authorized = not me.get('anonymous') context afterRender: -> super() return if @startsLoading @showReadOnly() if me.get('anonymous') + @patchesView = @insertSubView(new PatchesView(@article), @$el.find('.patches-view')) + @patchesView.load() openPreview: -> @preview = window.open('/editor/article/x/preview', 'preview', 'height=800,width=600') diff --git a/app/views/editor/thang/edit.coffee b/app/views/editor/thang/edit.coffee index 39fe787ba..3f6e624ce 100644 --- a/app/views/editor/thang/edit.coffee +++ b/app/views/editor/thang/edit.coffee @@ -58,7 +58,7 @@ module.exports = class ThangTypeEditView extends View context = super(context) context.thangType = @thangType context.animations = @getAnimationNames() - context.authorized = me.isAdmin() or @thangType.hasWriteAccess(me) + context.authorized = not me.get('anonymous') context getAnimationNames: -> @@ -350,7 +350,7 @@ module.exports = class ThangTypeEditView extends View schema: schema files: @files filePath: "db/thang.type/#{@thangType.get('original')}" - readOnly: true unless me.isAdmin() or @thangType.hasWriteAccess(me) + readOnly: me.get('anonymous') callbacks: change: @pushChangesToPreview select: @onSelectNode From 61e6c8dfc3083f5bd8fa8d4008d63c6c13a0df01 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 16:05:23 -0700 Subject: [PATCH 22/49] Fixed the gold view not showing numbers until the first change. --- app/views/play/level/gold_view.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/play/level/gold_view.coffee b/app/views/play/level/gold_view.coffee index f7168b386..a004f7252 100644 --- a/app/views/play/level/gold_view.coffee +++ b/app/views/play/level/gold_view.coffee @@ -15,7 +15,7 @@ module.exports = class GoldView extends View @teamGold = {} @teamGoldEarned = {} @shownOnce = false - + onGoldChanged: (e) -> return if @teamGold[e.team] is e.gold and @teamGoldEarned[e.team] is e.goldEarned @teamGold[e.team] = e.gold @@ -24,7 +24,7 @@ module.exports = class GoldView extends View unless goldEl.length teamEl = teamTemplate team: e.team @$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 if e.goldEarned and e.goldEarned > e.gold text += " (#{e.goldEarned})" From 908772d8fee604f1eb34d488dbaf9c0bc2f318f4 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 16:44:18 -0700 Subject: [PATCH 23/49] Fixed an instance where a level loading callback was erroring if called before the surface was built. --- app/views/play/level_view.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/play/level_view.coffee b/app/views/play/level_view.coffee index 88b6955e6..008dfba23 100644 --- a/app/views/play/level_view.coffee +++ b/app/views/play/level_view.coffee @@ -274,6 +274,7 @@ module.exports = class PlayLevelView extends View # Once Surface is Loaded #################################################### onLevelStarted: -> + return unless @surface? @loadingView.showReady() if window.currentModal and not window.currentModal.destroyed return Backbone.Mediator.subscribeOnce 'modal-closed', @onLevelStarted, @ From 49c8360d5b569a0f0d54bee93873dcd397053fd1 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 16:53:34 -0700 Subject: [PATCH 24/49] Fixed me emitting 'me:synced' and anything listening for that. --- app/lib/auth.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/auth.coffee b/app/lib/auth.coffee index b19fbc668..6d218608d 100644 --- a/app/lib/auth.coffee +++ b/app/lib/auth.coffee @@ -12,7 +12,7 @@ init = -> me.set 'testGroupNumber', Math.floor(Math.random() * 256) 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) -> user = new User(userObject) From 1263d4724ac889249d14facf4918df837f7fcb4f Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 16:56:47 -0700 Subject: [PATCH 25/49] Fixed the title in the gold view to handle when goldEarned isn't available. --- app/views/play/level/gold_view.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/play/level/gold_view.coffee b/app/views/play/level/gold_view.coffee index a004f7252..42ef28572 100644 --- a/app/views/play/level/gold_view.coffee +++ b/app/views/play/level/gold_view.coffee @@ -34,7 +34,13 @@ module.exports = class GoldView extends View @shownOnce = true 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) -> @$el.toggle not e.on if @shownOnce From 5d00aedac7fcafb53876ac45a642a5b5b496ddd7 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 18:13:19 -0700 Subject: [PATCH 26/49] Widened the click area on the wizard settings view for color config. --- app/styles/account/wizard-settings.sass | 4 ++++ app/templates/account/wizard_settings.jade | 2 +- app/templates/modal/wizard_settings.jade | 2 +- app/views/account/wizard_settings_view.coffee | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/styles/account/wizard-settings.sass b/app/styles/account/wizard-settings.sass index 83ca4f2ce..9a93d6613 100644 --- a/app/styles/account/wizard-settings.sass +++ b/app/styles/account/wizard-settings.sass @@ -8,9 +8,13 @@ width: 450px margin: 0 auto + label + cursor: pointer + #color-settings table float: left width: 250px + cursor: pointer .minicolors-input display: none diff --git a/app/templates/account/wizard_settings.jade b/app/templates/account/wizard_settings.jade index f0c95410e..192f758c4 100644 --- a/app/templates/account/wizard_settings.jade +++ b/app/templates/account/wizard_settings.jade @@ -1,5 +1,5 @@ #color-settings - table.table.table-bordered + table.table.table-bordered.table-hover tr th(data-i18n="wizard_settings.active") Active th(data-i18n="wizard_settings.color") Color diff --git a/app/templates/modal/wizard_settings.jade b/app/templates/modal/wizard_settings.jade index a301884ec..ea22506ec 100644 --- a/app/templates/modal/wizard_settings.jade +++ b/app/templates/modal/wizard_settings.jade @@ -17,4 +17,4 @@ block modal-body-wait-content .progress-bar 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 diff --git a/app/views/account/wizard_settings_view.coffee b/app/views/account/wizard_settings_view.coffee index 6e441654f..0c014fa22 100644 --- a/app/views/account/wizard_settings_view.coffee +++ b/app/views/account/wizard_settings_view.coffee @@ -11,6 +11,11 @@ module.exports = class WizardSettingsView extends CocoView startsLoading: true 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) -> colorGroup = $(e.target).closest('.color-group') @updateColorSettings(colorGroup) From 05560662dd82baa771cae174b70ca385cd1ca656 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 19:34:35 -0700 Subject: [PATCH 27/49] Various fixes to employer page/profile view --- app/locale/en.coffee | 2 +- app/schemas/models/user.coffee | 2 +- app/styles/employers.sass | 11 ++- app/templates/account/profile.jade | 2 +- app/templates/employers.jade | 109 ++++++++++++++--------------- app/views/employers_view.coffee | 7 +- 6 files changed, 73 insertions(+), 60 deletions(-) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index 7094f735e..5653c44c2 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -236,7 +236,7 @@ basics_country: "Country" basics_country_help: "Country you want to work in (or live in now)." 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_full_time: "Full-time" basics_looking_for_part_time: "Part-time" diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index b85d9f2bd..895b51974 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -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?'} 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!'} - 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.'}, c.object {title: 'Job', description: 'Some work experience you had.', required: ['employer', 'role', 'duration']}, employer: c.shortString {title: 'Employer', description: 'Name of your employer.'} diff --git a/app/styles/employers.sass b/app/styles/employers.sass index c9f519ce8..a73387eb2 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -17,15 +17,24 @@ margin-bottom: 10px .panel-heading background-color: darkgrey + cursor: pointer .panel-body background-color: darkgrey + border-radius: 4px + border-top-left-radius: 0px + border-top-right-radius: 0px + .panel + border: 1px red + border-radius: 0px #filters .filter_section - width: 16% + width: 25% display: inline-block vertical-align: top margin-bottom: 10px + label input + margin-right: 10px .get-started-button vertical-align: text-bottom margin-left: 10px diff --git a/app/templates/account/profile.jade b/app/templates/account/profile.jade index de9dcca11..c4ef36448 100644 --- a/app/templates/account/profile.jade +++ b/app/templates/account/profile.jade @@ -155,7 +155,7 @@ block content 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='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 label.control-label(data-i18n="account_profile.basics_looking_for") Looking For select.form-control(name='root[lookingFor]') diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 790058be5..7301fbfda 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -24,75 +24,71 @@ block content .panel-collapse.collapse.in#collapseOne .panel-body 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 h4 Visa - input(type="checkbox" name="visa" value="Authorized to work in the US") - | US Authorized + label + input(type="checkbox" name="visa" value="Authorized to work in the US") + | US Authorized br - input(type="checkbox" name="visa" value="Need visa sponsorship") - | Not Authorized + label + input(type="checkbox" name="visa" value="Need visa sponsorship") + | Not Authorized .filter_section#school_filter h4 School - input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") - | Top 20 Eng. + label + input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") + | Top 20 Eng. br - input(type="checkbox" name="schoolFilter" value="Other US") - | Other US + label + input(type="checkbox" name="schoolFilter" value="Other US") + | Other US br - input(type="checkbox" name="schoolFilter" value="Other Intl.") - | Other Intl. - .filter_section#location_filter - 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 + label + input(type="checkbox" name="schoolFilter" value="Other Intl.") + | Other Intl. .filter_section#role_filter h4 Role - input(type="checkbox" name="roleFilter" value="Web Developer") - | Web Developer + label + input(type="checkbox" name="roleFilter" value="Web Developer") + | Web Developer br - input(type="checkbox" name="roleFilter" value="Software Developer") - | Software Developer + label + input(type="checkbox" name="roleFilter" value="Software Developer") + | Software Developer br - input(type="checkbox" name="roleFilter" value="iOS Developer") - | iOS Developer + label + input(type="checkbox" name="roleFilter" value="iOS Developer") + | iOS Developer br - input(type="checkbox" name="roleFilter" value="Android Developer") - | Android Developer + label + input(type="checkbox" name="roleFilter" value="Android Developer") + | Android Developer br - input(type="checkbox" name="roleFilter" value="Project Manager") - | Project Developer + label + input(type="checkbox" name="roleFilter" value="Project Manager") + | Project Developer .filter_section#seniority_filter h4 Seniority - input(type="checkbox" name="seniorityFilter" value="College Student") - | College Student + label + input(type="checkbox" name="seniorityFilter" value="Management") + | Management br - input(type="checkbox" name="seniorityFilter" value="Recent Grad") - | Recent Grad + label + input(type="checkbox" name="seniorityFilter" value="Senior") + | Senior br - input(type="checkbox" name="seniorityFilter" value="Junior") - | Junior + label + input(type="checkbox" name="seniorityFilter" value="Junior") + | Junior br - input(type="checkbox" name="seniorityFilter" value="Senior") - | Senior + label + input(type="checkbox" name="seniorityFilter" value="Recent Grad") + | Recent Grad br - input(type="checkbox" name="seniorityFilter" value="Management") - | Management + label + input(type="checkbox" name="seniorityFilter" value="College Student") + | College Student + //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all button.btn#filter-button Filter @@ -108,11 +104,15 @@ block content - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; - var expired = profileAge > 2 * 30.4; - var curated = profile.curated; - + tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") - td(rowspan=2) + td(rowspan=3) .candidate-picture 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 td.candidate-description #{curated.shortDescription} else @@ -122,7 +122,7 @@ block content - var workHistory = curated.workHistory.join(","); td.tag_column img(src="/images/pages/employer/tag.png") - | #{curated.mainTag} + | #{profile.jobTitle} td.location_column img(src="/images/pages/employer/location.png") | #{curated.location} @@ -133,8 +133,7 @@ block content if workHistory img(src="/images/pages/employer/briefcase.png") | #{workHistory} - else - td Hi + if !isEmployer && !me.isAdmin() div#info_wrapper diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 5b7bd2710..a4473b53b 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -121,13 +121,18 @@ module.exports = class EmployersView extends View getRenderData: -> ctx = super() 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.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') + unless @isEmployer() or me.isAdmin() ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7) + if me.isAdmin() + ctx.featuredCandidates = ctx.candidates ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.remarks = {} ctx.remarks[remark.get('user')] = remark for remark in @remarks.models From 30671d82f6ad6aea510330c6a4dd64772df608e5 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 19:52:31 -0700 Subject: [PATCH 28/49] Removed PM and Management from filters --- app/schemas/models/user.coffee | 4 ++-- app/templates/employers.jade | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 895b51974..20346378b 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -142,11 +142,11 @@ UserSchema = c.object {}, roleFilter: title: 'Role' type: 'string' - enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] + enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer'] seniorityFilter: title: 'Seniority' type: 'string' - enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] + enum: ['College Student', 'Recent Grad', 'Junior', 'Senior'] featured: title: 'Featured' type: 'boolean' diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 7301fbfda..31ab8477e 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -63,16 +63,8 @@ block content label input(type="checkbox" name="roleFilter" value="Android Developer") | Android Developer - br - label - input(type="checkbox" name="roleFilter" value="Project Manager") - | Project Developer .filter_section#seniority_filter h4 Seniority - label - input(type="checkbox" name="seniorityFilter" value="Management") - | Management - br label input(type="checkbox" name="seniorityFilter" value="Senior") | Senior From 318b72d965129605ddd60d788be4eae48726c5e1 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 7 Jul 2014 20:01:05 -0700 Subject: [PATCH 29/49] Fixed #1273 with new Aeher version with new Filbert version. --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index beb943ad0..357b9d431 100644 --- a/bower.json +++ b/bower.json @@ -32,7 +32,7 @@ "firepad": "~0.1.2", "marked": "~0.3.0", "moment": "~2.5.0", - "aether": "~0.2.9", + "aether": "~0.2.22", "underscore.string": "~2.3.3", "firebase": "~1.0.2", "catiline": "~2.9.3", diff --git a/package.json b/package.json index 32568f23e..cba6e383e 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "redis": "", "webworker-threads": "~0.4.11", "node-gyp": "~0.13.0", - "aether": "~0.2.9", + "aether": "~0.2.22", "JASON": "~0.1.3", "JQDeferred": "~2.1.0" }, From 9313541f9f5aca6beee90c8d1db651d45e3b96a1 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 20:01:59 -0700 Subject: [PATCH 30/49] Fixed targeting on employers CSS --- app/styles/employers.sass | 6 +++--- app/templates/employers.jade | 10 +++++----- app/views/employers_view.coffee | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index a73387eb2..c88e1e3c6 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -1,6 +1,6 @@ #employers-view - button + .employer-button background: #fce232 /* Old browsers */ 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)) @@ -42,13 +42,13 @@ #filter-button, #create-alert-button float: right - #login-link, #logout-button + #login-link, #logout-link float: right color: #333333 display: inline-block :visited color: #333333 - #logout-button:hover + #logout-link:hover cursor: pointer #tagline, .hiring-call-to-action diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 31ab8477e..38e9f2852 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -7,10 +7,10 @@ block content if !isEmployer && !me.isAdmin() #tagline 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 if !me.get('anonymous') - a#logout-button(data-i18n="login.log_out") Logout + a#logout-link(data-i18n="login.log_out") Logout br #filter .panel-group#filter_panel @@ -83,7 +83,7 @@ block content //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all - button.btn#filter-button Filter + button.btn.employer-button#filter-button Filter p#results #{numberOfCandidates} results //button.btn#create-alert-button Create Alert if candidates.length @@ -131,7 +131,7 @@ block content div#info_wrapper span.hiring-call-to-action 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: .reasons#top_row @@ -153,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. span.hiring-call-to-action 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 .reason_long img.employer_icon(src="/images/pages/employer/employer_icon1.png") diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index a4473b53b..9c236a398 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -21,6 +21,7 @@ module.exports = class EmployersView extends View events: 'click tbody tr': 'onCandidateClicked' + 'click #logout-link': 'logoutAccount' 'change #filters input': 'onFilterChanged' 'click #filter-button': 'applyFilters' 'change #select_all_checkbox': 'handleSelectAllChange' From cef8fe074a0de8c7667a0f9443b59642d19ec871 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 20:03:02 -0700 Subject: [PATCH 31/49] Add mobile developer to the schema --- app/schemas/models/user.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 20346378b..2c4a0b8eb 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -142,7 +142,7 @@ UserSchema = c.object {}, roleFilter: title: 'Role' type: 'string' - enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer'] + enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Mobile Developer'] seniorityFilter: title: 'Seniority' type: 'string' From 285c7ff049477c66c2bf1b7f2b19ebf609ead898 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 20:05:28 -0700 Subject: [PATCH 32/49] Added school changes to schema --- app/schemas/models/user.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 2c4a0b8eb..0bfbcc52d 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -134,7 +134,7 @@ UserSchema = c.object {}, schoolFilter: title: 'School' type: 'string' - enum: ['Top 20 Eng.', 'Other US', 'Other Intl.'] + enum: ['Top 20 Eng.', 'Other US', 'Other Intl.','Top School', 'Other'] locationFilter: title: 'Location' type: 'string' From 30745a25ca3622a5d2084119b8711482d1823dc3 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 20:24:29 -0700 Subject: [PATCH 33/49] Consolidated iOS and Android into Mobile --- app/schemas/models/user.coffee | 2 +- app/templates/employers.jade | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 0bfbcc52d..87884bb93 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -142,7 +142,7 @@ UserSchema = c.object {}, roleFilter: title: 'Role' type: 'string' - enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Mobile Developer'] + enum: ['Web Developer', 'Software Developer', 'Mobile Developer'] seniorityFilter: title: 'Seniority' type: 'string' diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 38e9f2852..5f3121cce 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -57,12 +57,8 @@ block content | Software Developer br label - input(type="checkbox" name="roleFilter" value="iOS Developer") - | iOS Developer - br - label - input(type="checkbox" name="roleFilter" value="Android Developer") - | Android Developer + input(type="checkbox" name="roleFilter" value="Mobile Developer") + | Mobile Developer .filter_section#seniority_filter h4 Seniority label From 08b9a8fdaaa101ca38586701e6f5e539adf841f6 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 21:04:12 -0700 Subject: [PATCH 34/49] Various changes to education filter --- app/schemas/models/user.coffee | 2 +- app/templates/employers.jade | 14 +++++--------- app/views/employers_view.coffee | 6 +++--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 87884bb93..edb2279bb 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -134,7 +134,7 @@ UserSchema = c.object {}, schoolFilter: title: 'School' type: 'string' - enum: ['Top 20 Eng.', 'Other US', 'Other Intl.','Top School', 'Other'] + enum: ['Top School', 'Other'] locationFilter: title: 'Location' type: 'string' diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 5f3121cce..547cee9bf 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -34,18 +34,14 @@ block content input(type="checkbox" name="visa" value="Need visa sponsorship") | Not Authorized .filter_section#school_filter - h4 School + h4 Education label - input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") - | Top 20 Eng. + input(type="checkbox" name="schoolFilter" value="Top School") + | Top School br label - input(type="checkbox" name="schoolFilter" value="Other US") - | Other US - br - label - input(type="checkbox" name="schoolFilter" value="Other Intl.") - | Other Intl. + input(type="checkbox" name="schoolFilter" value="Other") + | Other .filter_section#role_filter h4 Role label diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 9c236a398..54279d21c 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -112,10 +112,10 @@ module.exports = class EmployersView extends View @filters = phoneScreenFilter: [true, false] visa: ['Authorized to work in the US', 'Need visa sponsorship'] - schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.'] + schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.', 'Top School', 'Other'] locationFilter: ['Bay Area', 'New York', 'Other US', 'International'] - roleFilter: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] - seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] + roleFilter: ['Web Developer', 'Software Developer', 'Mobile Developer'] + seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior'] @defaultFilters = _.cloneDeep @filters From e294f344c4e6bf04f98a9eb92e7358451b2b5141 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 21:29:48 -0700 Subject: [PATCH 35/49] Move featured candidates to top of sort --- app/views/employers_view.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 54279d21c..df9c0522d 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -112,7 +112,7 @@ module.exports = class EmployersView extends View @filters = phoneScreenFilter: [true, false] visa: ['Authorized to work in the US', 'Need visa sponsorship'] - schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.', 'Top School', 'Other'] + schoolFilter: ['Top School', 'Other'] locationFilter: ['Bay Area', 'New York', 'Other US', 'International'] roleFilter: ['Web Developer', 'Software Developer', 'Mobile Developer'] seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior'] @@ -122,9 +122,9 @@ module.exports = class EmployersView extends View getRenderData: -> ctx = super() ctx.isEmployer = @isEmployer() - 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 @candidates.models, (c) -> -1 * c.get('jobProfile').experience ctx.candidates = _.sortBy ctx.candidates, (c) -> not c.get('jobProfile').curated? + ctx.candidates = _.sortBy ctx.candidates, (c) -> c.get('jobProfile').curated?.featured ctx.activeCandidates = _.filter 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') From e71ca28f02f96bd79e39cf2631bd16991c0eef19 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 21:43:30 -0700 Subject: [PATCH 36/49] Implement candidate filter counts next to filters --- app/templates/employers.jade | 22 +++++++++++----------- app/views/employers_view.coffee | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 547cee9bf..3b3bfc661 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -28,50 +28,50 @@ block content h4 Visa label input(type="checkbox" name="visa" value="Authorized to work in the US") - | US Authorized + | US Authorized (#{candidatesInFilter("visa","Authorized to work in the US")}) br label input(type="checkbox" name="visa" value="Need visa sponsorship") - | Not Authorized + | Not Authorized (#{candidatesInFilter("visa","Need visa sponsorship")}) .filter_section#school_filter h4 Education label input(type="checkbox" name="schoolFilter" value="Top School") - | Top School + | Top School (#{candidatesInFilter("schoolFilter","Top School")}) br label input(type="checkbox" name="schoolFilter" value="Other") - | Other + | Other (#{candidatesInFilter("schoolFilter","Other")}) .filter_section#role_filter h4 Role label input(type="checkbox" name="roleFilter" value="Web Developer") - | Web Developer + | Web Developer (#{candidatesInFilter("roleFilter","Web Developer")}) br label input(type="checkbox" name="roleFilter" value="Software Developer") - | Software Developer + | Software Developer (#{candidatesInFilter("roleFilter","Software Developer")}) br label input(type="checkbox" name="roleFilter" value="Mobile Developer") - | Mobile Developer + | Mobile Developer (#{candidatesInFilter("roleFilter","Mobile Developer")}) .filter_section#seniority_filter h4 Seniority label input(type="checkbox" name="seniorityFilter" value="Senior") - | Senior + | Senior (#{candidatesInFilter("seniorityFilter","Senior")}) br label input(type="checkbox" name="seniorityFilter" value="Junior") - | Junior + | Junior (#{candidatesInFilter("seniorityFilter","Junior")}) br label input(type="checkbox" name="seniorityFilter" value="Recent Grad") - | Recent Grad + | Recent Grad (#{candidatesInFilter("seniorityFilter","Recent Grad")}) br label input(type="checkbox" name="seniorityFilter" value="College Student") - | College Student + | College Student (#{candidatesInFilter("seniorityFilter","College Student")}) //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index df9c0522d..050887ed3 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -118,10 +118,24 @@ module.exports = class EmployersView extends View seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior'] @defaultFilters = _.cloneDeep @filters - + candidatesInFilter: (filterName, filterValue) => + candidates = @getActiveAndApprovedCandidates() + if filterName and filterValue + if filterName is 'visa' + return (_.filter candidates, (c) -> c.get('jobProfile').visa is filterValue).length + else + return (_.filter candidates, (c) -> c.get('jobProfile').curated?[filterName] is filterValue).length + else + return Math.floor(Math.random() * 500) + + getActiveAndApprovedCandidates: => + candidates = _.filter @candidates.models, (c) -> c.get('jobProfile').active + return _.filter candidates, (c) -> c.get('jobProfileApproved') + getRenderData: -> ctx = super() ctx.isEmployer = @isEmployer() + #If you change the candidates displayed, change candidatesInFilter() ctx.candidates = _.sortBy @candidates.models, (c) -> -1 * c.get('jobProfile').experience ctx.candidates = _.sortBy ctx.candidates, (c) -> not c.get('jobProfile').curated? ctx.candidates = _.sortBy ctx.candidates, (c) -> c.get('jobProfile').curated?.featured @@ -134,6 +148,7 @@ module.exports = class EmployersView extends View ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7) if me.isAdmin() ctx.featuredCandidates = ctx.candidates + ctx.candidatesInFilter = @candidatesInFilter ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.remarks = {} ctx.remarks[remark.get('user')] = remark for remark in @remarks.models From aa40257034daf1314fdf03a819f2e480e29cc606 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 7 Jul 2014 23:23:36 -0700 Subject: [PATCH 37/49] Table styling/ copy edit --- app/styles/employers.sass | 13 ++++++- app/styles/recruitment_base.sass | 36 ++++++++++++++++++- app/templates/employers.jade | 11 +++--- app/templates/modal/auth.jade | 26 +++++++++----- .../modal/employer_signup_modal.jade | 19 +++------- app/views/employers_view.coffee | 3 +- app/views/kinds/ModalView.coffee | 4 +++ app/views/modal/auth_modal.coffee | 3 +- 8 files changed, 82 insertions(+), 33 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index c88e1e3c6..78437d593 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -146,10 +146,21 @@ margin-top: 10px padding-bottom: 5px padding-top: 10px + .candidate-name-cell + position: relative + top: 10px + //refactor later, bad practice + + .border_row border-bottom: 1px solid #d3d3d3 vertical-align: bottom - padding-top: 0px + td + padding-top: 0px + padding-bottom: 5px + .description_row td + padding-bottom: 0px + padding-top: 15px #results display: inline-block diff --git a/app/styles/recruitment_base.sass b/app/styles/recruitment_base.sass index 06bfe815c..f6c6e1062 100644 --- a/app/styles/recruitment_base.sass +++ b/app/styles/recruitment_base.sass @@ -18,4 +18,38 @@ #employer-content-area - margin: auto \ No newline at end of file + margin: auto + +.employer-modal-background-wrapper + background-color: white + border: 2px #333333 solid + border-radius: 4px + h1, h2, h3, h4, h5 + color: black + font-family: Arial, Helvetica, sans-serif + .input-large + font-size: 28px + height: 60px + border: 2px rgb(231,231,231) solid + box-shadow: none + width: 70% + margin-left: 15% + #create-account-button, #contract-agreement-button, #login-button + background: #fce232 /* Old browsers */ + 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-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: -o-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: -ms-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: linear-gradient(to bottom, #fce232 0%,#ea8e2b 100%) + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fce232', endColorstr='#ea8e2b',GradientType=0 ) + height: 60px + font-size: 24px + color: black + .login-link + text-decoration: underline + #login-button + margin-left: 40% + width: 20% + + \ No newline at end of file diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 3b3bfc661..8d066ab19 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -93,9 +93,10 @@ block content td(rowspan=3) .candidate-picture img(src=candidate.getPhotoURL(50,false,true), alt=profile.name, title=profile.name, width=50) - td - strong - | #{profile.name} + if !isntEmployer + td.candidate-name-cell + strong + | #{profile.name} tr.description_row(data-candidate-id=candidate.id) if curated && curated.shortDescription td.candidate-description #{curated.shortDescription} @@ -136,9 +137,7 @@ block content h3(data-i18n="employers.weeding") We've done the weeding for you. //this will break in i18n. Fix the inlining p(data-i18n="employers.weeding_blurb") - | Every candidate that has a - span.glyphicon.glyphicon-earphone - | icon has already gone through a phone screen with us. We only feature developers that we would work with. + | We only feature developers that we would work with. We've reviewed each profile (in addition to meeting with many of the candidates.) .reason img(class="employer_icon" src="/images/pages/employer/employer_icon3.png") h3(data-i18n="employers.pass_screen") They will pass your technical screen. diff --git a/app/templates/modal/auth.jade b/app/templates/modal/auth.jade index 626ca4827..7edff3fff 100644 --- a/app/templates/modal/auth.jade +++ b/app/templates/modal/auth.jade @@ -19,12 +19,19 @@ block modal-body-content p(data-i18n="signup.description") It's free. Just need a couple things and you'll be good to go: form.form - .form-group - label.control-label(for="email", data-i18n="general.email") Email - input#email.input-large.form-control(name="email", type="email", value=formValues.email) - .form-group - label.control-label(for="password", data-i18n="general.password") Password - input#password.input-large.form-control(name="password", type="password", value=formValues.password) + if onEmployersPage + .form-group + input#email.input-large.form-control(name="email", type="email", value=formValues.email, placeholder="Email") + .form-group + input#password.input-large.form-control(name="password", type="password", value=formValues.password, placeholder="Password") + + else + .form-group + label.control-label(for="email", data-i18n="general.email") Email + input#email.input-large.form-control(name="email", type="email", value=formValues.email) + .form-group + label.control-label(for="password", data-i18n="general.password") Password + input#password.input-large.form-control(name="password", type="password", value=formValues.password) if mode === 'signup' .form-group.checkbox @@ -38,8 +45,11 @@ block modal-body-content a(href="https://en.wikipedia.org/wiki/Children's_Online_Privacy_Protection_Act", data-i18n="signup.coppa_why", target="_blank") (Why?) if mode === 'login' - input.btn.btn-info.btn-large#login-button(value=translate("login.log_in"), type="submit") - .btn.btn-default.btn-large#switch-to-signup-button(data-i18n="login.sign_up") Create Account + if onEmployersPage + input.btn.btn-info.btn-large#login-button(value=translate("login.log_in"), type="submit") + else + input.btn.btn-info.btn-large#login-button(value=translate("login.log_in"), type="submit") + .btn.btn-default.btn-large#switch-to-signup-button(data-i18n="login.sign_up") Create Account if mode === 'signup' input.btn.btn-info.btn-large#signup-button(value=translate("signup.sign_up"), type="submit") diff --git a/app/templates/modal/employer_signup_modal.jade b/app/templates/modal/employer_signup_modal.jade index d6a627ddf..8d0429137 100644 --- a/app/templates/modal/employer_signup_modal.jade +++ b/app/templates/modal/employer_signup_modal.jade @@ -2,7 +2,7 @@ extends /templates/modal/modal_base block modal-header-content if userIsAnonymous || !userIsAuthorized - h3(data-i18n="employer_signup.title") Sign up to hire CodeCombat players! + h3(data-i18n="employer_signup.title") Sign Up to Hire CodeCombat Players else h3 CodeCombat Placement Agreement @@ -13,28 +13,17 @@ block modal-body-content else if sentMoreInfoEmail | Thanks! You should receive an email from George shortly. else - h4(data-i18n="employer_signup.sub_heading") Let us find your next brilliant developers. - p Create an account to get started! .form#signup-form .form-group - label.control-label(for="signup-email", data-i18n="general.email") Email - input#signup-email.form-control.input-large(name="email",type="email") - .form-group - label.control-label(for="signup-password", data-i18n="general.password") Password - input#signup-password.input-large.form-control(name="password", type="password") + input#signup-email.form-control.input-large(name="email",type="email" placeholder="Email") + .form-group + input#signup-password.input-large.form-control(name="password", type="password" placeholder="Password") .modal-footer.linkedin button.btn.btn-primary(id="create-account-button") Create Account br br | Already have a CodeCombat account? a.login-link(data-toggle="coco-modal", data-target="modal/auth") Log in to continue! - h4 Want more information first? - p Enter your email and George, our CEO, will contact you shortly. - .form - .form-group - label.control-label(for="more-info-email", data-i18n="general.email") Email - input#more-info-email.form-control.input-large(name="more-info-email",type="email") - button.btn.btn-primary(id="more-info-button") Send me more information! else if !userIsAuthorized .modal-footer.linkedin p Please sign into your LinkedIn account to verify your identity. diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 050887ed3..984e18365 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -155,6 +155,7 @@ module.exports = class EmployersView extends View ctx.moment = moment ctx._ = _ ctx.numberOfCandidates = ctx.featuredCandidates.length + ctx.isntEmployer = not (@isEmployer() or me.isAdmin()) ctx isEmployer: -> @@ -179,7 +180,7 @@ module.exports = class EmployersView extends View # $('.nano').nanoScroller({scrollTo: $(window.location.hash)}) checkForEmployerSignupHash: => - if window.location.hash is '#employerSignupLoggingIn' and not ('employer' in me.get('permissions')) + if window.location.hash is '#employerSignupLoggingIn' and not ('employer' in me.get('permissions')) and not me.isAdmin() @openModalView application.router.getView('modal/employer_signup', '_modal') window.location.hash = '' diff --git a/app/views/kinds/ModalView.coffee b/app/views/kinds/ModalView.coffee index ad25b3c09..b2fecf1ce 100644 --- a/app/views/kinds/ModalView.coffee +++ b/app/views/kinds/ModalView.coffee @@ -32,6 +32,10 @@ module.exports = class ModalView extends CocoView afterRender: -> super() + if Backbone.history.fragment is "employers" + $(@$el).find(".background-wrapper").each -> + $(this).addClass("employer-modal-background-wrapper").removeClass("background-wrapper") + if @modalWidthPercent @$el.find('.modal-dialog').css width: "#{@modalWidthPercent}%" @$el.on 'hide.bs.modal', => diff --git a/app/views/modal/auth_modal.coffee b/app/views/modal/auth_modal.coffee index 81edc7dd4..5f486281e 100644 --- a/app/views/modal/auth_modal.coffee +++ b/app/views/modal/auth_modal.coffee @@ -30,8 +30,9 @@ module.exports = class AuthModalView extends View application.tracker.trackEvent 'Started Signup', authModalTitle: c.title, descriptionOn: c.descriptionOn c.mode = @mode c.formValues = @previousFormInputs or {} + c.onEmployersPage = Backbone.history.fragment is "employers" c - + afterInsert: -> super() _.delay application.router.renderLoginButtons, 500 From bbc793b003895702e665194e2e00779d1bb238b1 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Tue, 8 Jul 2014 10:42:36 -0700 Subject: [PATCH 38/49] Fixed modal popping up when logging out sometimes --- app/views/employers_view.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 984e18365..c611c60f0 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -300,7 +300,9 @@ module.exports = class EmployersView extends View 8: '✓': filterSelectExactMatch '✗': filterSelectExactMatch - + logoutAccount: -> + window.location.hash = '' + super() onCandidateClicked: (e) -> id = $(e.target).closest('tr').data('candidate-id') if id and (@isEmployer() or me.isAdmin()) From 21d056ff013d47e85dcf6dfd65d2fcef0b89f757 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Tue, 8 Jul 2014 11:19:14 -0700 Subject: [PATCH 39/49] Instant application of filters --- app/templates/employers.jade | 1 - app/views/employers_view.coffee | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 8d066ab19..00c925657 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -75,7 +75,6 @@ block content //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all - button.btn.employer-button#filter-button Filter p#results #{numberOfCandidates} results //button.btn#create-alert-button Create Alert if candidates.length diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index c611c60f0..13713a7a2 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -70,6 +70,7 @@ module.exports = class EmployersView extends View for filterName, filterValues of @filters if filterValues.length is 0 @filters[filterName] = @defaultFilters[filterName] + @applyFilters() openSignupModal: -> @openModalView new EmployerSignupView From 3ff66d7807c5dd15326c516d1e1c0f08e0f07b45 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Tue, 8 Jul 2014 16:26:51 -0700 Subject: [PATCH 40/49] Removed empty file and unused function --- server/queues/sendwithus.coffee | 0 server/routes/mail.coffee | 15 +-------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 server/queues/sendwithus.coffee diff --git a/server/queues/sendwithus.coffee b/server/queues/sendwithus.coffee deleted file mode 100644 index e69de29bb..000000000 diff --git a/server/routes/mail.coffee b/server/routes/mail.coffee index f5885a38a..5742b2b65 100644 --- a/server/routes/mail.coffee +++ b/server/routes/mail.coffee @@ -15,20 +15,7 @@ sendwithus = require '../sendwithus' module.exports.setup = (app) -> app.all config.mail.mailchimpWebhook, handleMailchimpWebHook app.get '/mail/cron/ladder-update', handleLadderUpdate - -getAllLadderScores = (next) -> - query = Level.find({type: 'ladder'}) - .select('levelID') - .lean() - query.exec (err, levels) -> - if err - log.error 'Couldn\'t fetch ladder levels. Error: ', err - return next [] - for level in levels - for team in ['humans', 'ogres'] - 'I ... am not doing this.' - # Query to get sessions to make histogram - # db.level.sessions.find({'submitted': true, 'levelID': 'brawlwood', team: 'ogres'}, {'_id': 0, 'totalScore': 1}) + DEBUGGING = false LADDER_PREGAME_INTERVAL = 2 * 3600 * 1000 # Send emails two hours before players last submitted. From 02ccade43fdab5ef84367863d7a0d127f0091849 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Tue, 8 Jul 2014 16:28:45 -0700 Subject: [PATCH 41/49] Removed extraneous code --- server/routes/mail.coffee | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/server/routes/mail.coffee b/server/routes/mail.coffee index 5742b2b65..4fdcef128 100644 --- a/server/routes/mail.coffee +++ b/server/routes/mail.coffee @@ -1,16 +1,12 @@ mail = require '../commons/mail' User = require '../users/User' errors = require '../commons/errors' -#request = require 'request' config = require '../../server_config' LevelSession = require '../levels/sessions/LevelSession' Level = require '../levels/Level' log = require 'winston' sendwithus = require '../sendwithus' -#badLog = (text) -> -# console.log text -# request.post 'http://requestb.in/1brdpaz1', { form: {log: text} } module.exports.setup = (app) -> app.all config.mail.mailchimpWebhook, handleMailchimpWebHook @@ -82,14 +78,10 @@ sendLadderUpdateEmail = (session, now, daysAgo) -> matches = _.filter session.matches, (match) -> match.date >= getTimeFromDaysAgo now, daysAgo defeats = _.filter matches, (match) -> match.metrics.rank is 1 and match.opponents[0].metrics.rank is 0 victories = _.filter matches, (match) -> match.metrics.rank is 0 and match.opponents[0].metrics.rank is 1 - #ties = _.filter matches, (match) -> match.metrics.rank is 0 and match.opponents[0].metrics.rank is 0 + defeat = _.last defeats victory = _.last victories - #log.info "#{user.name} had #{matches.length} matches from last #{daysAgo} days out of #{session.matches.length} total matches. #{defeats.length} defeats, #{victories.length} victories, and #{ties.length} ties." - #matchInfos = ("\t#{match.date}\t#{match.date >= getTimeFromDaysAgo(now, daysAgo)}\t#{match.metrics.rank}\t#{match.opponents[0].metrics.rank}" for match in session.matches) - #log.info "Matches:\n#{matchInfos.join('\n')}" - sendEmail = (defeatContext, victoryContext) -> # TODO: do something with the preferredLanguage? context = @@ -161,7 +153,6 @@ getScoreHistoryGraphURL = (session, daysAgo) -> handleMailchimpWebHook = (req, res) -> post = req.body - #badLog("Got post data: #{JSON.stringify(post, null, '\t')}") unless post.type in ['unsubscribe', 'profile'] res.send 'Bad post type' @@ -200,11 +191,8 @@ module.exports.handleProfileUpdate = handleProfileUpdate = (user, post) -> user.set 'mailChimp.email', post.data.email user.set 'mailChimp.euid', post.data.id -# badLog("Updating user object to: #{JSON.stringify(user.toObject(), null, '\t')}") module.exports.handleUnsubscribe = handleUnsubscribe = (user) -> user.set 'emailSubscriptions', [] for emailGroup in mail.NEWS_GROUPS user.setEmailSubscription emailGroup, false - -# badLog("Unsubscribing user object to: #{JSON.stringify(user.toObject(), null, '\t')}") From 31be904b03bbeca97976730489919b8fdb70364d Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 8 Jul 2014 16:43:30 -0700 Subject: [PATCH 42/49] Working on flippable tile highlight bounds marks. --- app/lib/surface/Mark.coffee | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/app/lib/surface/Mark.coffee b/app/lib/surface/Mark.coffee index 54853f506..ff4631aec 100644 --- a/app/lib/surface/Mark.coffee +++ b/app/lib/surface/Mark.coffee @@ -72,11 +72,14 @@ module.exports = class Mark extends CocoClass color = "rgba(#{colors[0]}, #{colors[1]}, #{colors[2]}, 0.5)" [w, h] = [@sprite.thang.width * Camera.PPM, @sprite.thang.height * Camera.PPM * @camera.y2x] - if @sprite.thang.drawsBoundsStyle is 'border-text' - shape = new createjs.Shape() + if @sprite.thang.drawsBoundsStyle in ['border-text', 'corner-text'] + @drawsBoundsBorderShape = shape = new createjs.Shape() shape.graphics.setStrokeStyle 5 shape.graphics.beginStroke color - shape.graphics.beginFill color.replace('0.5', '0.25') + if @sprite.thang.drawsBoundsStyle is 'border-text' + shape.graphics.beginFill color.replace('0.5', '0.25') + else + shape.graphics.beginFill color if @sprite.thang.shape in ['ellipsoid', 'disc'] shape.drawEllipse 0, 0, w, h else @@ -101,7 +104,7 @@ module.exports = class Mark extends CocoClass else console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', @sprite.thang.drawsBoundsStyle - if w > 0 and h > 0 + if w > 0 and h > 0 and @sprite.thang.drawsBoundsStyle is 'border-text' @mark.cache -w / 2, -h / 2, w, h, 2 @lastWidth = @sprite.thang.width @lastHeight = @sprite.thang.height @@ -226,13 +229,12 @@ module.exports = class Mark extends CocoClass @highlightTween = createjs.Tween.get(@mark).to({}, @highlightDelay).call => @mark.visible = true @highlightDelay = @highlightTween = null + @updateAlpha @alpha if @name in ['shadow', 'bounds'] true updatePosition: (pos) -> if @sprite?.thang and @name in ['shadow', 'debug', 'target', 'selection', 'repair'] pos = @camera.worldToSurface x: @sprite.thang.pos.x, y: @sprite.thang.pos.y - if @name is 'shadow' - @updateAlpha @alpha else pos ?= @sprite?.imageObject @mark.x = pos.x @@ -248,7 +250,9 @@ module.exports = class Mark extends CocoClass if @name is 'shadow' worldZ = @sprite.thang.pos.z - @sprite.thang.depth / 2 + @sprite.getBobOffset() @mark.alpha = @alpha * 0.451 / Math.sqrt(worldZ / 2 + 1) - else if @name isnt 'bounds' + else if @name is 'bounds' + @drawsBoundsBorderShape?.alpha = Math.floor @sprite.thang.alpha # Stop drawing bounds as soon as alpha is reduced at all + else @mark.alpha = @alpha updateRotation: -> From c19a31a58c6890ded6dbeb80dacd7d7ec187faeb Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 8 Jul 2014 18:51:10 -0700 Subject: [PATCH 43/49] Fixed some wizard positioning issues in multiplayer. --- app/lib/surface/SpriteBoss.coffee | 2 ++ app/views/play/level_view.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/lib/surface/SpriteBoss.coffee b/app/lib/surface/SpriteBoss.coffee index 1483481a7..cab039d97 100644 --- a/app/lib/surface/SpriteBoss.coffee +++ b/app/lib/surface/SpriteBoss.coffee @@ -111,6 +111,8 @@ module.exports = class SpriteBoss extends CocoClass sprite.targetPos = if opponent.team is 'ogres' then {x: 52, y: 52} else {x: 28, y: 28} else if opponent.levelSlug is 'dungeon-arena' sprite.targetPos = if opponent.team is 'ogres' then {x: 72, y: 39} else {x: 9, y: 39} + else if opponent.levelSlug is 'criss-cross' + sprite.targetPos = if opponent.team is 'ogres' then {x: 50, y: 12} else {x: 0, y: 40} else sprite.targetPos = if opponent.team is 'ogres' then {x: 52, y: 28} else {x: 20, y: 28} diff --git a/app/views/play/level_view.coffee b/app/views/play/level_view.coffee index 008dfba23..70a93f6b2 100644 --- a/app/views/play/level_view.coffee +++ b/app/views/play/level_view.coffee @@ -281,7 +281,7 @@ module.exports = class PlayLevelView extends View @surface.showLevel() if @otherSession # TODO: colorize name and cloud by team, colorize wizard by user's color config - @surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team') + @surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team'), levelSlug: @level.get('slug') @loadingView?.unveil() onLoadingViewUnveiled: (e) -> From 928e4362bae63fd36d221cba50fd64ac03a9c6b4 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 8 Jul 2014 20:47:22 -0700 Subject: [PATCH 44/49] Made some style tweaks to the employers page to move the filters into a sidebar when authorized. --- app/styles/employers.sass | 95 ++++++++------ app/templates/employers.jade | 217 ++++++++++++++++---------------- app/views/employers_view.coffee | 7 +- 3 files changed, 171 insertions(+), 148 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 78437d593..48ff80e10 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -1,4 +1,13 @@ #employers-view + .artisanal-claim + font-variant: small-caps + text-align: center + font-size: 20px + font-weight: bold + font-family: Copperplate, "Copperplate Gothic Light", fantasy + border-top: 1px solid #DBDBDB + border-bottom: 1px solid #DBDBDB + margin-bottom: 5px .employer-button background: #fce232 /* Old browsers */ @@ -14,13 +23,17 @@ //filter panels #filter + border: 2px solid #CBCBCB margin-bottom: 10px .panel-heading - background-color: darkgrey + background-color: #D9D9D9 cursor: pointer + border-top-left-radius: 0px + border-top-right-radius: 0px + #folder-icon + margin-right: 5px .panel-body - background-color: darkgrey - border-radius: 4px + background-color: #D9D9D9 border-top-left-radius: 0px border-top-right-radius: 0px .panel @@ -28,13 +41,24 @@ border-radius: 0px #filters + margin-bottom: 10px .filter_section - width: 25% + min-width: 25% + margin-right: 10px display: inline-block vertical-align: top - margin-bottom: 10px - label input - margin-right: 10px + + h4 + margin-bottom: 5px + + label + display: block + font-weight: normal + margin-bottom: 0 + cursor: pointer + input + margin-right: 5px + .get-started-button vertical-align: text-bottom margin-left: 10px @@ -82,7 +106,6 @@ height: 150px padding-right: 15px - .reason width: 33% padding-left: 3% @@ -108,9 +131,6 @@ #bottom_row height: auto #candidate-table - width: 96% - margin-left: 2% - margin-right: 2% background-color: #E7E7E7 table cursor: pointer @@ -118,49 +138,48 @@ margin-left: 2% margin-right: 2% margin-bottom: 30px - .tag_column - width: 25% + .tag_column, .location_column, .education_column, .work_column + width: 33% display: inline-block - .location_column - display: inline-block - width: 25% - .education_column - display: inline-block - width: 25% - .work_column - display: inline-block - width: 25% + img + margin-right: 5px + vertical-align: top tr .candidate-picture - width: 50px - height: 50px + width: 100px + height: 100px border-radius: 5px overflow: hidden margin-right: 10px + img + border-radius: 5px .candidate-description width: 100% vertical-align: bottom - td - margin-bottom: 10px - margin-top: 10px + td.candidate-description padding-bottom: 5px - padding-top: 10px - .candidate-name-cell - position: relative - top: 10px - //refactor later, bad practice - - + td.candidate-name-cell + padding-top: 15px + padding-bottom: 5px + font-size: 18px + .border_row border-bottom: 1px solid #d3d3d3 vertical-align: bottom td - padding-top: 0px - padding-bottom: 5px - .description_row td - padding-bottom: 0px + padding-top: 5px + padding-bottom: 15px + + .teaser-profiles #candidate-table table + .tag_column, .location_column, .education_column, .work_column + width: 25% + tr + .candidate-description padding-top: 15px + .candidate-picture + width: 50px + height: 50px #results display: inline-block diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 00c925657..6c7010d29 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -1,6 +1,8 @@ extends /templates/recruitment_base block content + .artisanal-claim + | Always 100% Pre-Screened if me.get('anonymous') a#login-link Login br @@ -12,114 +14,117 @@ block content if !me.get('anonymous') a#logout-link(data-i18n="login.log_out") Logout br - #filter - .panel-group#filter_panel - a#filter-link(data-toggle="collapse" data-target="#collapseOne") - .panel.panel-default - .panel-heading - h4.panel-title - - span.glyphicon.glyphicon-folder-open#folder-icon - | Filter - .panel-collapse.collapse.in#collapseOne - .panel-body - form#filters - .filter_section#visa_filter - h4 Visa - label - input(type="checkbox" name="visa" value="Authorized to work in the US") - | US Authorized (#{candidatesInFilter("visa","Authorized to work in the US")}) - br - label - input(type="checkbox" name="visa" value="Need visa sponsorship") - | Not Authorized (#{candidatesInFilter("visa","Need visa sponsorship")}) - .filter_section#school_filter - h4 Education - label - input(type="checkbox" name="schoolFilter" value="Top School") - | Top School (#{candidatesInFilter("schoolFilter","Top School")}) - br - label - input(type="checkbox" name="schoolFilter" value="Other") - | Other (#{candidatesInFilter("schoolFilter","Other")}) - .filter_section#role_filter - h4 Role - label - input(type="checkbox" name="roleFilter" value="Web Developer") - | Web Developer (#{candidatesInFilter("roleFilter","Web Developer")}) - br - label - input(type="checkbox" name="roleFilter" value="Software Developer") - | Software Developer (#{candidatesInFilter("roleFilter","Software Developer")}) - br - label - input(type="checkbox" name="roleFilter" value="Mobile Developer") - | Mobile Developer (#{candidatesInFilter("roleFilter","Mobile Developer")}) - .filter_section#seniority_filter - h4 Seniority - label - input(type="checkbox" name="seniorityFilter" value="Senior") - | Senior (#{candidatesInFilter("seniorityFilter","Senior")}) - br - label - input(type="checkbox" name="seniorityFilter" value="Junior") - | Junior (#{candidatesInFilter("seniorityFilter","Junior")}) - br - label - input(type="checkbox" name="seniorityFilter" value="Recent Grad") - | Recent Grad (#{candidatesInFilter("seniorityFilter","Recent Grad")}) - br - label - input(type="checkbox" name="seniorityFilter" value="College Student") - | College Student (#{candidatesInFilter("seniorityFilter","College Student")}) - - //input#select_all_checkbox(type="checkbox" name="select_all" checked) - //| Select all - p#results #{numberOfCandidates} results - //button.btn#create-alert-button Create Alert - if candidates.length - #candidate-table - table - tbody - for candidate, index in featuredCandidates - - var profile = candidate.get('jobProfile'); - - var authorized = candidate.id; // If we have the id, then we are authorized. - - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; - - var expired = profileAge > 2 * 30.4; - - var curated = profile.curated; - - tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") - td(rowspan=3) - .candidate-picture - img(src=candidate.getPhotoURL(50,false,true), alt=profile.name, title=profile.name, width=50) - if !isntEmployer - td.candidate-name-cell - strong - | #{profile.name} - tr.description_row(data-candidate-id=candidate.id) - if curated && curated.shortDescription - td.candidate-description #{curated.shortDescription} - else - td.candidate-description #{profile.shortDescription} - tr.border_row(data-candidate-id=candidate.id) - if curated - - var workHistory = curated.workHistory.join(","); - td.tag_column - img(src="/images/pages/employer/tag.png") - | #{profile.jobTitle} - td.location_column - img(src="/images/pages/employer/location.png") - | #{curated.location} - td.education_column - img(src="/images/pages/employer/education.png") - | #{curated.education} - td.work_column - if workHistory - img(src="/images/pages/employer/briefcase.png") - | #{workHistory} + .row + - var fullProfiles = isEmployer || me.isAdmin(); + #candidates-column(class=fullProfiles ? "full-profiles col-md-9" : "teaser-profiles col-md-12") + if candidates.length + #candidate-table + table + tbody + for candidate, index in featuredCandidates + - var profile = candidate.get('jobProfile'); + - var authorized = candidate.id; // If we have the id, then we are authorized. + - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; + - var expired = profileAge > 2 * 30.4; + - var curated = profile.curated; + - var photoSize = fullProfiles ? 100 : 50; + + tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") + td(rowspan=3) + .candidate-picture + img(src=candidate.getPhotoURL(photoSize, false, true), alt=profile.name, title=profile.name, width=photoSize) + if fullProfiles + td.candidate-name-cell + strong= profile.name + | - + span= profile.jobTitle + tr.description_row(data-candidate-id=candidate.id) + if curated && curated.shortDescription + td.candidate-description #{curated.shortDescription} + else + td.candidate-description #{profile.shortDescription} + tr.border_row(data-candidate-id=candidate.id) + if curated + - var workHistory = curated.workHistory.join(","); + if !fullProfiles + td.tag_column + img(src="/images/pages/employer/tag.png") + | #{profile.jobTitle} + td.location_column + img(src="/images/pages/employer/location.png") + | #{curated.location} + td.education_column + img(src="/images/pages/employer/education.png") + | #{curated.education} + td.work_column + if workHistory + img(src="/images/pages/employer/briefcase.png") + | #{workHistory} + if fullProfiles + .col-md-3 + #filter + .panel-group#filter_panel + a#filter-link(data-toggle="collapse" data-target="#collapseOne") + .panel.panel-default + .panel-heading + h4.panel-title + span.glyphicon.glyphicon-folder-open#folder-icon + | Filter + .panel-collapse.collapse.in#collapseOne + .panel-body + p + strong We've already technically screened all our candidates + | , but you can also filter further: + form#filters + .filter_section#visa_filter + h4 Visa + label + input(type="checkbox" name="visa" value="Authorized to work in the US") + | US Authorized (#{candidatesInFilter("visa","Authorized to work in the US")}) + label + input(type="checkbox" name="visa" value="Need visa sponsorship") + | Not Authorized (#{candidatesInFilter("visa","Need visa sponsorship")}) + .filter_section#school_filter + h4 Education + label + input(type="checkbox" name="schoolFilter" value="Top School") + | Top School (#{candidatesInFilter("schoolFilter","Top School")}) + label + input(type="checkbox" name="schoolFilter" value="Other") + | Other (#{candidatesInFilter("schoolFilter","Other")}) + .filter_section#role_filter + h4 Role + label + input(type="checkbox" name="roleFilter" value="Web Developer") + | Web Developer (#{candidatesInFilter("roleFilter","Web Developer")}) + label + input(type="checkbox" name="roleFilter" value="Software Developer") + | Software Developer (#{candidatesInFilter("roleFilter","Software Developer")}) + label + input(type="checkbox" name="roleFilter" value="Mobile Developer") + | Mobile Developer (#{candidatesInFilter("roleFilter","Mobile Developer")}) + .filter_section#seniority_filter + h4 Experience + label + input(type="checkbox" name="seniorityFilter" value="Senior") + | Senior (#{candidatesInFilter("seniorityFilter","Senior")}) + label + input(type="checkbox" name="seniorityFilter" value="Junior") + | Junior (#{candidatesInFilter("seniorityFilter","Junior")}) + label + input(type="checkbox" name="seniorityFilter" value="Recent Grad") + | Recent Grad (#{candidatesInFilter("seniorityFilter","Recent Grad")}) + label + input(type="checkbox" name="seniorityFilter" value="College Student") + | College Student (#{candidatesInFilter("seniorityFilter","College Student")}) + + //input#select_all_checkbox(type="checkbox" name="select_all" checked) + //| Select all + p#results #{numberOfCandidates} results + //button.btn#create-alert-button Create Alert - if !isEmployer && !me.isAdmin() + if !fullProfiles div#info_wrapper span.hiring-call-to-action h2#start-hiring(data-i18n="employers.start_hiring") Start hiring. diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 13713a7a2..03ba35c85 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -128,11 +128,11 @@ module.exports = class EmployersView extends View return (_.filter candidates, (c) -> c.get('jobProfile').curated?[filterName] is filterValue).length else return Math.floor(Math.random() * 500) - + getActiveAndApprovedCandidates: => candidates = _.filter @candidates.models, (c) -> c.get('jobProfile').active return _.filter candidates, (c) -> c.get('jobProfileApproved') - + getRenderData: -> ctx = super() ctx.isEmployer = @isEmployer() @@ -143,7 +143,7 @@ module.exports = class EmployersView extends View ctx.activeCandidates = _.filter 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') - + unless @isEmployer() or me.isAdmin() ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7) @@ -156,7 +156,6 @@ module.exports = class EmployersView extends View ctx.moment = moment ctx._ = _ ctx.numberOfCandidates = ctx.featuredCandidates.length - ctx.isntEmployer = not (@isEmployer() or me.isAdmin()) ctx isEmployer: -> From 4d50a6d76ac1a7ddbae22effffae62d272006344 Mon Sep 17 00:00:00 2001 From: gosnat Date: Wed, 9 Jul 2014 08:02:58 -0500 Subject: [PATCH 45/49] Update play_view.coffee Added "Guide Everyone Home" level --- app/views/play_view.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/play_view.coffee b/app/views/play_view.coffee index 4db520f00..4dea0a4f6 100644 --- a/app/views/play_view.coffee +++ b/app/views/play_view.coffee @@ -248,6 +248,13 @@ module.exports = class PlayView extends View image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png' description: 'Collect a hundred mushrooms in just five lines of code - by Nathan Gossett' } + { + name: 'Guide Everyone Home' + difficulty: 2 + id: 'guide-everyone-home' + image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png' + description: 'Fetch the wizards teleporting into the area - by Nathan Gossett' + } ] context.campaigns = [ From a7690f0931a6eee1eff9fb7381d84f536e95bfc2 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 9 Jul 2014 10:10:43 -0700 Subject: [PATCH 46/49] Fixed #1198 --- server/patches/patch_handler.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/patches/patch_handler.coffee b/server/patches/patch_handler.coffee index f9c3a2224..bb376bbdf 100644 --- a/server/patches/patch_handler.coffee +++ b/server/patches/patch_handler.coffee @@ -62,7 +62,7 @@ PatchHandler = class PatchHandler extends Handler return unless watchers?.length User.find({_id: {$in: watchers}}).select({email: 1, name: 1}).exec (err, watchers) => for watcher in watchers - @sendPatchCreatedEmail req.user, watcher, doc, doc.targetLoaded, req.body.editPath + @sendPatchCreatedEmail req.user, watcher, doc, doc.targetLoaded, req.headers['x-current-path'] sendPatchCreatedEmail: (patchCreator, watcher, patch, target, editPath) -> # return if watcher._id is patchCreator._id From 3fbce8334ddddb6a2f2aa02e6ee9582eb9f2452e Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 9 Jul 2014 10:47:02 -0700 Subject: [PATCH 47/49] Fixed #1276 --- app/views/account/wizard_settings_view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/wizard_settings_view.coffee b/app/views/account/wizard_settings_view.coffee index 0c014fa22..7035cdc45 100644 --- a/app/views/account/wizard_settings_view.coffee +++ b/app/views/account/wizard_settings_view.coffee @@ -52,7 +52,7 @@ module.exports = class WizardSettingsView extends CocoView exists: wizardSettings[name] rgb: hslToHex(hsl) } - c.colorGroups = (f(colorName) for colorName in _.keys colorGroups) + c.colorGroups = (f(colorName) for colorName in _.keys colorGroups when colorName isnt 'team') c afterRender: -> From 44e5c2826c6703775cb0830f6e0442988be8ae4e Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 9 Jul 2014 11:59:21 -0700 Subject: [PATCH 48/49] Proper Treema node behavior for different code languages in default code, property documentation, and snippets. --- app/schemas/models/level_component.coffee | 19 +++++------- app/schemas/schemas.coffee | 8 ++--- app/treema-ext.coffee | 36 +++++++++++++++++------ 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/app/schemas/models/level_component.coffee b/app/schemas/models/level_component.coffee index b97cb7d1e..a974d6dc7 100644 --- a/app/schemas/models/level_component.coffee +++ b/app/schemas/models/level_component.coffee @@ -33,6 +33,7 @@ PropertyDocumentationSchema = c.object { title: 'Language Descriptions', description: 'Property descriptions by code language.', additionalProperties: {type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'} + format: 'code-languages-object' } ] args: c.array {title: 'Arguments', description: 'If this property has type "function", then provide documentation for any function arguments.'}, c.FunctionArgumentSchema @@ -44,19 +45,11 @@ PropertyDocumentationSchema = c.object { type: 'object', title: 'Language Examples', description: 'Examples by code language.', - additionalProperties: {type: 'string', description: 'An example code block.', format: 'javascript'} # TODO: not JS + additionalProperties: {type: 'string', description: 'An example code block.', format: 'code'} + format: 'code-languages-object' } ] - snippets: c.object { - title: 'Snippets', - description: 'List of snippets for the respective programming languages' - }, - javascript: c.object {title: 'JavaScript'}, c.codeSnippet 'javascript' - coffeescript: c.object {title: 'CoffeeScript'}, c.codeSnippet 'coffee' - python: c.object {title: 'Python'}, c.codeSnippet 'python' - clojure: c.object {title: 'Clojure'}, c.codeSnippet 'clojure' - lua: c.object {title: 'Lua'}, c.codeSnippet 'lua' - io: c.object {title: 'IO'}, c.codeSnippet 'io' + snippets: {type: 'object', title: 'Snippets', description: 'List of snippets for the respective programming languages', additionalProperties: c.codeSnippet, format: 'code-languages-object'} returns: c.object { title: 'Return Value' description: 'Optional documentation of any return value.' @@ -71,7 +64,8 @@ PropertyDocumentationSchema = c.object { type: 'object', title: 'Language Examples', description: 'Example return values by code language.', - additionalProperties: c.shortString(description: 'Example return value.', format: 'javascript') # TODO: not JS + additionalProperties: c.shortString(description: 'Example return value.', format: 'code') + format: 'code-languages-object' } ] description: @@ -82,6 +76,7 @@ PropertyDocumentationSchema = c.object { title: 'Language Descriptions', description: 'Example return values by code language.', additionalProperties: {type: 'string', description: 'Description of the return value.', maxLength: 1000} + format: 'code-languages-object' } ] diff --git a/app/schemas/schemas.coffee b/app/schemas/schemas.coffee index 8474a9be0..7b8775b68 100644 --- a/app/schemas/schemas.coffee +++ b/app/schemas/schemas.coffee @@ -186,11 +186,9 @@ me.FunctionArgumentSchema = me.object { description: 'Default value of the argument. (Your code should set this.)' 'default': null -me.codeSnippet = (mode) -> - return snippet = - code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} - # code: {type: 'string', format: 'ace', aceMode: 'ace/mode/'+mode, title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} - tab: {type: 'string', title: 'Tab Trigger', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'} +me.codeSnippet = + code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} + tab: {type: 'string', title: 'Tab Trigger', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'} me.activity = me.object {description: 'Stats on an activity'}, first: me.date() diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee index 0bb6772e6..a56b4a45a 100644 --- a/app/treema-ext.coffee +++ b/app/treema-ext.coffee @@ -197,14 +197,28 @@ class ImageFileTreema extends TreemaNode.nodeMap.string @flushChanges() @refreshDisplay() -class CoffeeTreema extends TreemaNode.nodeMap.ace + +codeLanguages = + javascript: 'ace/mode/javascript' + coffeescript: 'ace/mode/coffee' + python: 'ace/mode/python' + clojure: 'ace/mode/clojure' + lua: 'ace/mode/lua' + io: 'ace/mode/text' + +class CodeLanguagesObjectTreema extends TreemaNode.nodeMap.object + childPropertiesAvailable: -> + (key for key in _.keys(codeLanguages) when not @data[key]?) + +class CodeTreema extends TreemaNode.nodeMap.ace constructor: -> super(arguments...) - @schema.aceMode = 'ace/mode/coffee' - @schema.aceTabSize = 2 + @schema.aceTabSize = 4 buildValueForEditing: (valEl) -> super(valEl) + if not @schema.aceMode and mode = codeLanguages[@keyForParent] + @editor.getSession().setMode mode @editor.on('change', @onEditorChange) valEl @@ -213,15 +227,18 @@ class CoffeeTreema extends TreemaNode.nodeMap.ace @flushChanges() @getRoot().broadcastChanges() -class JavaScriptTreema extends CoffeeTreema +class CoffeeTreema extends CodeTreema + constructor: -> + super(arguments...) + @schema.aceMode = 'ace/mode/coffee' + @schema.aceTabSize = 2 + +class JavaScriptTreema extends CodeTreema constructor: -> super(arguments...) @schema.aceMode = 'ace/mode/javascript' @schema.aceTabSize = 4 -KB = 1024 -MB = 1024*1024 - class InternationalizationNode extends TreemaNode.nodeMap.object findLanguageName: (languageCode) -> @@ -246,8 +263,7 @@ class InternationalizationNode extends TreemaNode.nodeMap.object #this must be filled out in order for the i18n node to work childPropertiesAvailable: -> - return _.keys locale - + (key for key in _.keys(locale) when not @data[key]?) class LatestVersionCollection extends CocoCollection @@ -395,6 +411,8 @@ module.exports.setup = -> TreemaNode.setNodeSubclass('date-time', DateTimeTreema) TreemaNode.setNodeSubclass('version', VersionTreema) TreemaNode.setNodeSubclass('markdown', LiveEditingMarkup) + TreemaNode.setNodeSubclass('code-languages-object', CodeLanguagesObjectTreema) + TreemaNode.setNodeSubclass('code', CodeTreema) TreemaNode.setNodeSubclass('coffee', CoffeeTreema) TreemaNode.setNodeSubclass('javascript', JavaScriptTreema) TreemaNode.setNodeSubclass('image-file', ImageFileTreema) From d74a778f67bc289fa0d2355e2bf23bfbcc4fe5f9 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 9 Jul 2014 12:19:49 -0700 Subject: [PATCH 49/49] Made creating components open to everyone! --- app/templates/editor/level/component/new.jade | 5 ++++- app/templates/editor/level/components_tab.jade | 2 +- app/views/editor/level/component/new.coffee | 7 ++++++- server/levels/components/level_component_handler.coffee | 4 ---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/templates/editor/level/component/new.jade b/app/templates/editor/level/component/new.jade index 6af6f987c..139ecb616 100644 --- a/app/templates/editor/level/component/new.jade +++ b/app/templates/editor/level/component/new.jade @@ -7,7 +7,10 @@ block modal-body-content form.form .form-group label(for="level-component-system", data-i18n="editor.new_component_field_system").control-label System - input.form-control#level-component-system(name="system", type="text") + select.form-control#level-component-system(name='system') + for system in systems + option(value=system)= system + //input.form-control#level-component-system(name="system", type="text") .form-group label(for="level-component-name", data-i18n="general.name").control-label Name input.form-control#level-component-name(name="name", type="text") diff --git a/app/templates/editor/level/components_tab.jade b/app/templates/editor/level/components_tab.jade index d457ade2a..235cb9f71 100644 --- a/app/templates/editor/level/components_tab.jade +++ b/app/templates/editor/level/components_tab.jade @@ -6,7 +6,7 @@ #components-treema.nano-content .edit-component-container - if me.isAdmin() + if !me.get('anonymous') button.btn.btn-primary#create-new-component-button-no-select span.icon-plus span.text(data-i18n="editor.level_component_btn_new") Create New Component diff --git a/app/views/editor/level/component/new.coffee b/app/views/editor/level/component/new.coffee index 072a69df6..a1f2985ce 100644 --- a/app/views/editor/level/component/new.coffee +++ b/app/views/editor/level/component/new.coffee @@ -13,7 +13,12 @@ module.exports = class LevelComponentNewView extends View events: 'click #new-level-component-submit': 'makeNewLevelComponent' 'submit form': 'makeNewLevelComponent' - + + getRenderData: -> + c = super() + c.systems = LevelComponent.schema.properties.system.enum + c + makeNewLevelComponent: (e) -> e.preventDefault() system = @$el.find('#level-component-system').val() diff --git a/server/levels/components/level_component_handler.coffee b/server/levels/components/level_component_handler.coffee index 889619d8d..0dd44ec4a 100644 --- a/server/levels/components/level_component_handler.coffee +++ b/server/levels/components/level_component_handler.coffee @@ -21,8 +21,4 @@ LevelComponentHandler = class LevelComponentHandler extends Handler props.push('official') if req.user?.isAdmin() props - hasAccess: (req) -> - req.method in ['GET', 'PUT'] or req.user?.isAdmin() - - module.exports = new LevelComponentHandler()