From a979c3256771d644cc4bfc63ae256f4c4e6c0905 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 11 Jul 2014 15:17:16 +0100 Subject: [PATCH 1/7] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index ccfd1d33c..4c3a766fe 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -1,4 +1,4 @@ -module.exports = nativeDescription: "Português europeu", englishDescription: "Portuguese (Portugal)", translation: +module.exports = nativeDescription: "Português (Portugal)", englishDescription: "Portuguese (Portugal)", translation: common: loading: "A carregar..." saving: "A guardar..." @@ -12,11 +12,11 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P delay_3_sec: "3 segundos" delay_5_sec: "5 segundos" manual: "Manual" -# fork: "Fork" + fork: "Bifurcar" play: "Jogar" retry: "Tentar novamente" -# watch: "Watch" -# unwatch: "Unwatch" + watch: "Vigiar" + unwatch: "Desvigiar" submit_patch: "Submeter Versão" units: @@ -37,7 +37,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P modal: close: "Fechar" - okay: "Okay" + okay: "Ok" not_found: page_not_found: "Página não encontrada" @@ -81,7 +81,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P 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: "Mais de 13 anos ou não estado-unidense " coppa_why: "(Porquê?)" creating: "A Criar Conta..." sign_up: "Registar" @@ -107,7 +107,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P adventurer_forum: "fórum do Aventureiro" adventurer_suffix: "." campaign_beginner: "Campanha para Iniciantes" - campaign_beginner_description: "... onde aprende a feitiçaria da programação." + campaign_beginner_description: "... onde aprende a magia 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" @@ -236,7 +236,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # 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? (If you live in Canada or Australia, mark authorized.)" +# 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" @@ -445,7 +445,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # infinite_loop_reset_level: "Reset Level" # infinite_loop_comment_out: "Comment Out My Code" -# keyboard_shortcuts: + keyboard_shortcuts: # keyboard_shortcuts: "Keyboard Shortcuts" # space: "Space" # enter: "Enter" @@ -475,7 +475,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P lg_title: "Últimos Jogos" # clas: "CLAs" -# community: + community: # level_editor: "Level Editor" # main_title: "CodeCombat Community" # facebook: "Facebook" @@ -579,7 +579,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P hard: "Difícil" # player: "Player" -# about: + about: # who_is_codecombat: "Who is CodeCombat?" # why_codecombat: "Why CodeCombat?" # who_description_prefix: "together started CodeCombat in 2013. We also created " @@ -602,7 +602,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # michael_description: "Programmer, sys-admin, and undergrad technical wunderkind, Michael is the person keeping our servers online." # glen_description: "Programmer and passionate game developer, with the motivation to make this world a better place, by developing things that matter. The word impossible can't be found in his dictionary. Learning new skills is his joy!" -# legal: + legal: # page_title: "Legal" # opensource_intro: "CodeCombat is free to play and completely open source." # opensource_description_prefix: "Check out " @@ -663,7 +663,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening." # canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence." -# contribute: + contribute: # page_title: "Contributing" # character_classes_title: "Character Classes" # introduction_desc_intro: "We have high hopes for CodeCombat." @@ -756,20 +756,20 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # helpful_ambassadors: "Our Helpful Ambassadors:" classes: - archmage_title: "Archmage" - archmage_title_description: "(Coder)" - artisan_title: "Artisan" +# archmage_title: "Archmage" +# archmage_title_description: "(Coder)" + artisan_title: "Artesão" artisan_title_description: "(Construtor de Níveis)" - adventurer_title: "Adventurer" - adventurer_title_description: "(Play-tester de Níveis)" - scribe_title: "Scribe" + adventurer_title: "Aventureiro" + adventurer_title_description: "(Testador de Níveis)" + scribe_title: "Escrivão" scribe_title_description: "(Editor de Artigos)" - diplomat_title: "Diplomat" + diplomat_title: "Diplomata" diplomat_title_description: "(Tradutor)" - ambassador_title: "Ambassador" + ambassador_title: "Embaixador" ambassador_title_description: "(Suporte)" - counselor_title: "Counselor" - counselor_title_description: "(Expert/ Professor)" + counselor_title: "Conselheiro" + counselor_title_description: "(Especialista/Professor)" ladder: please_login: "Por favor, faz log in antes de jogar um jogo para o campeonato." @@ -824,7 +824,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # rules: "Rules" # winners: "Winners" -# ladder_prizes: + ladder_prizes: # title: "Tournament Prizes" # blurb_1: "These prizes will be awarded according to" # blurb_2: "the tournament rules" @@ -858,7 +858,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P new_to_programming: ". Novo na programação? Faz a Campanha para Iniciantes para expandires as tuas capacidades." so_ready: "Estou mais que pronto para isto" -# loading_error: + loading_error: # could_not_load: "Error loading from server" # connection_failure: "Connection failed." # unauthorized: "You need to be signed in. Do you have cookies disabled?" @@ -868,12 +868,12 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # timeout: "Server timeout." # conflict: "Resource conflict." # bad_input: "Bad input." -# server_error: "Server error." -# unknown: "Unknown error." + server_error: "Erro do servidor." + unknown: "Erro desconhecido." -# resources: -# your_sessions: "Your Sessions" -# level: "Level" + resources: + your_sessions: "As Suas Sessões" + level: "Nível" # social_network_apis: "Social Network APIs" # facebook_status: "Facebook Status" # facebook_friends: "Facebook Friends" @@ -905,7 +905,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # user_remark: "User Remark" # versions: "Versions" -# delta: + delta: # added: "Added" # modified: "Modified" # deleted: "Deleted" From 6f94b0ce6f4011403bca3494b4359b17b0f93cf9 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 11 Jul 2014 15:18:26 +0100 Subject: [PATCH 2/7] 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 4c3a766fe..6628699db 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -236,7 +236,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # 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" From ef9ea0c4895342e6f4f299d740be175d06d2df48 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 11 Jul 2014 18:12:12 +0100 Subject: [PATCH 3/7] Fixed a issue with headers There was a issue with the headers that is now corrected. --- app/locale/pt-PT.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 6628699db..abba1c8a8 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -325,7 +325,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # pass_screen: "They will pass your technical screen." # pass_screen_blurb: "Review each candidate's code before reaching out. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News." # make_hiring_easier: "Make my hiring easier, please." - what: "O Que é o 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." # 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." @@ -445,7 +445,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # infinite_loop_reset_level: "Reset Level" # infinite_loop_comment_out: "Comment Out My Code" - keyboard_shortcuts: +# keyboard_shortcuts: # keyboard_shortcuts: "Keyboard Shortcuts" # space: "Space" # enter: "Enter" @@ -475,7 +475,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: lg_title: "Últimos Jogos" # clas: "CLAs" - community: +# community: # level_editor: "Level Editor" # main_title: "CodeCombat Community" # facebook: "Facebook" @@ -579,7 +579,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: hard: "Difícil" # player: "Player" - about: +# about: # who_is_codecombat: "Who is CodeCombat?" # why_codecombat: "Why CodeCombat?" # who_description_prefix: "together started CodeCombat in 2013. We also created " @@ -602,7 +602,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # michael_description: "Programmer, sys-admin, and undergrad technical wunderkind, Michael is the person keeping our servers online." # glen_description: "Programmer and passionate game developer, with the motivation to make this world a better place, by developing things that matter. The word impossible can't be found in his dictionary. Learning new skills is his joy!" - legal: +# legal: # page_title: "Legal" # opensource_intro: "CodeCombat is free to play and completely open source." # opensource_description_prefix: "Check out " @@ -663,7 +663,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening." # canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence." - contribute: +# contribute: # page_title: "Contributing" # character_classes_title: "Character Classes" # introduction_desc_intro: "We have high hopes for CodeCombat." @@ -824,7 +824,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # rules: "Rules" # winners: "Winners" - ladder_prizes: +# ladder_prizes: # title: "Tournament Prizes" # blurb_1: "These prizes will be awarded according to" # blurb_2: "the tournament rules" @@ -905,7 +905,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # user_remark: "User Remark" # versions: "Versions" - delta: +# delta: # added: "Added" # modified: "Modified" # deleted: "Deleted" From d4c21e0349db84ab5f394c47b7a836f54026f8b2 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 11 Jul 2014 18:34:22 +0100 Subject: [PATCH 4/7] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index abba1c8a8..439badbe0 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -858,7 +858,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: new_to_programming: ". Novo na programação? Faz a Campanha para Iniciantes para expandires as tuas capacidades." so_ready: "Estou mais que pronto para isto" - loading_error: +# loading_error: # could_not_load: "Error loading from server" # connection_failure: "Connection failed." # unauthorized: "You need to be signed in. Do you have cookies disabled?" @@ -868,12 +868,12 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # timeout: "Server timeout." # conflict: "Resource conflict." # bad_input: "Bad input." - server_error: "Erro do servidor." - unknown: "Erro desconhecido." +# server_error: "Server error." +# unknown: "Unknown error." - resources: - your_sessions: "As Suas Sessões" - level: "Nível" +# resources: +# your_sessions: "Your Sessions" +# level: "Level" # social_network_apis: "Social Network APIs" # facebook_status: "Facebook Status" # facebook_friends: "Facebook Friends" From bad11f0eea9dc3bb9db7afbddb99f93744198685 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 11 Jul 2014 19:08:14 +0100 Subject: [PATCH 5/7] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 439badbe0..e61cf9f08 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -445,7 +445,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # infinite_loop_reset_level: "Reset Level" # infinite_loop_comment_out: "Comment Out My Code" -# keyboard_shortcuts: +# keyboard_shortcuts: # keyboard_shortcuts: "Keyboard Shortcuts" # space: "Space" # enter: "Enter" @@ -475,7 +475,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: lg_title: "Últimos Jogos" # clas: "CLAs" -# community: +# community: # level_editor: "Level Editor" # main_title: "CodeCombat Community" # facebook: "Facebook" @@ -579,7 +579,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: hard: "Difícil" # player: "Player" -# about: +# about: # who_is_codecombat: "Who is CodeCombat?" # why_codecombat: "Why CodeCombat?" # who_description_prefix: "together started CodeCombat in 2013. We also created " @@ -602,7 +602,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # michael_description: "Programmer, sys-admin, and undergrad technical wunderkind, Michael is the person keeping our servers online." # glen_description: "Programmer and passionate game developer, with the motivation to make this world a better place, by developing things that matter. The word impossible can't be found in his dictionary. Learning new skills is his joy!" -# legal: +# legal: # page_title: "Legal" # opensource_intro: "CodeCombat is free to play and completely open source." # opensource_description_prefix: "Check out " @@ -663,7 +663,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening." # canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence." -# contribute: +# contribute: # page_title: "Contributing" # character_classes_title: "Character Classes" # introduction_desc_intro: "We have high hopes for CodeCombat." @@ -824,7 +824,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # rules: "Rules" # winners: "Winners" -# ladder_prizes: +# ladder_prizes: # title: "Tournament Prizes" # blurb_1: "These prizes will be awarded according to" # blurb_2: "the tournament rules" @@ -858,7 +858,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: new_to_programming: ". Novo na programação? Faz a Campanha para Iniciantes para expandires as tuas capacidades." so_ready: "Estou mais que pronto para isto" -# loading_error: +# loading_error: # could_not_load: "Error loading from server" # connection_failure: "Connection failed." # unauthorized: "You need to be signed in. Do you have cookies disabled?" @@ -871,7 +871,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # server_error: "Server error." # unknown: "Unknown error." -# resources: +# resources: # your_sessions: "Your Sessions" # level: "Level" # social_network_apis: "Social Network APIs" @@ -905,7 +905,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: # user_remark: "User Remark" # versions: "Versions" -# delta: +# delta: # added: "Added" # modified: "Modified" # deleted: "Deleted" From fede037e89a0ae4421fa6ddbca1c25f9f4077171 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Fri, 11 Jul 2014 13:55:30 -0700 Subject: [PATCH 6/7] Fixed time NaN --- app/views/play/level/tome/spell_debug_view.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/play/level/tome/spell_debug_view.coffee b/app/views/play/level/tome/spell_debug_view.coffee index 8d08dca71..e69fadc98 100644 --- a/app/views/play/level/tome/spell_debug_view.coffee +++ b/app/views/play/level/tome/spell_debug_view.coffee @@ -38,6 +38,8 @@ module.exports = class DebugView extends View @lastFrameRequested = -1 @workerIsSimulating = false @spellHasChanged = false + @currentFrame = 0 + @frameRate = 10 #only time it won't be set is at very beginning @debouncedTooltipUpdate = _.debounce @updateTooltipProgress, 100 pad2: (num) -> From 17ba4bc8a7aa65a73e7bb16888e80db3ab384e28 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 11 Jul 2014 18:07:00 -0700 Subject: [PATCH 7/7] Starting to limit some property documentation to specific code languages. Fixed Criss-Cross squares on frame 0. Removed comment box highlighting from the gutter. --- app/lib/surface/Mark.coffee | 16 +++++++++------- app/schemas/models/level_component.coffee | 1 + app/treema-ext.coffee | 7 +++++++ app/views/play/level/tome/spell_view.coffee | 1 + 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/lib/surface/Mark.coffee b/app/lib/surface/Mark.coffee index ff4631aec..9752ca837 100644 --- a/app/lib/surface/Mark.coffee +++ b/app/lib/surface/Mark.coffee @@ -65,6 +65,8 @@ module.exports = class Mark extends CocoClass buildBounds: -> @mark = new createjs.Container() @mark.mouseChildren = false + style = @sprite.thang.drawsBoundsStyle + return if style is 'corner-text' and @sprite.thang.world.age is 0 # Confusingly make some semi-random colors that'll be consistent based on the drawsBoundsIndex @drawsBoundsIndex = @sprite.thang.drawsBoundsIndex @@ -72,11 +74,11 @@ 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 in ['border-text', 'corner-text'] + if style in ['border-text', 'corner-text'] @drawsBoundsBorderShape = shape = new createjs.Shape() shape.graphics.setStrokeStyle 5 shape.graphics.beginStroke color - if @sprite.thang.drawsBoundsStyle is 'border-text' + if style is 'border-text' shape.graphics.beginFill color.replace('0.5', '0.25') else shape.graphics.beginFill color @@ -88,13 +90,13 @@ module.exports = class Mark extends CocoClass shape.graphics.endFill() @mark.addChild shape - if @sprite.thang.drawsBoundsStyle is 'border-text' + if style is 'border-text' text = new createjs.Text '' + @drawsBoundsIndex, '20px Arial', color.replace('0.5', '1') text.regX = text.getMeasuredWidth() / 2 text.regY = text.getMeasuredHeight() / 2 text.shadow = new createjs.Shadow('#000000', 1, 1, 0) @mark.addChild text - else if @sprite.thang.drawsBoundsStyle is 'corner-text' + else if style is 'corner-text' return if @sprite.thang.world.age is 0 letter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'[@drawsBoundsIndex % 26] text = new createjs.Text letter, '14px Arial', '#333333' # color.replace('0.5', '1') @@ -102,9 +104,9 @@ module.exports = class Mark extends CocoClass text.y = -h / 2 + 2 @mark.addChild text else - console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', @sprite.thang.drawsBoundsStyle + console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', style - if w > 0 and h > 0 and @sprite.thang.drawsBoundsStyle is 'border-text' + if w > 0 and h > 0 and style is 'border-text' @mark.cache -w / 2, -h / 2, w, h, 2 @lastWidth = @sprite.thang.width @lastHeight = @sprite.thang.height @@ -130,7 +132,7 @@ module.exports = class Mark extends CocoClass @mark.regX = width / 2 @mark.regY = height / 2 @mark.layerIndex = 10 - @mark.cache -1, 0, width+2, height # not actually faster than simple ellipse draw + @mark.cache -1, -1, width + 2, height + 2 # not actually faster than simple ellipse draw buildRadius: (range) -> alpha = 0.15 diff --git a/app/schemas/models/level_component.coffee b/app/schemas/models/level_component.coffee index 738e954ce..162abc617 100644 --- a/app/schemas/models/level_component.coffee +++ b/app/schemas/models/level_component.coffee @@ -23,6 +23,7 @@ PropertyDocumentationSchema = c.object { required: ['name', 'type', 'description'] }, name: {type: 'string', title: 'Name', description: 'Name of the property.'} + codeLanguages: c.array {title: 'Specific Code Languages', description: 'If present, then only the languages specified will show this documentation. Leave unset for language-independent documentation.', format: 'code-languages-array'}, c.shortString(title: 'Code Language', description: 'A specific code language to show this documentation for.', format: 'code-language') # not actual JS types, just whatever they describe... type: c.shortString(title: 'Type', description: 'Intended type of the property.') description: diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee index a56b4a45a..314f30149 100644 --- a/app/treema-ext.coffee +++ b/app/treema-ext.coffee @@ -210,6 +210,12 @@ class CodeLanguagesObjectTreema extends TreemaNode.nodeMap.object childPropertiesAvailable: -> (key for key in _.keys(codeLanguages) when not @data[key]?) +class CodeLanguageTreema extends TreemaNode.nodeMap.string + buildValueForEditing: (valEl) -> + super(valEl) + valEl.find('input').autocomplete(source: _.keys(codeLanguages), minLength: 0, delay: 0, autoFocus: true) + valEl + class CodeTreema extends TreemaNode.nodeMap.ace constructor: -> super(arguments...) @@ -412,6 +418,7 @@ module.exports.setup = -> TreemaNode.setNodeSubclass('version', VersionTreema) TreemaNode.setNodeSubclass('markdown', LiveEditingMarkup) TreemaNode.setNodeSubclass('code-languages-object', CodeLanguagesObjectTreema) + TreemaNode.setNodeSubclass('code-language', CodeLanguageTreema) TreemaNode.setNodeSubclass('code', CodeTreema) TreemaNode.setNodeSubclass('coffee', CoffeeTreema) TreemaNode.setNodeSubclass('javascript', JavaScriptTreema) diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee index 7c3114f59..745e3c9fe 100644 --- a/app/views/play/level/tome/spell_view.coffee +++ b/app/views/play/level/tome/spell_view.coffee @@ -599,6 +599,7 @@ module.exports = class SpellView extends View null highlightComments: -> + return # Slightly buggy and not that great, so let's not do it. lines = $(@ace.container).find('.ace_text-layer .ace_line_group') session = @aceSession top = Math.floor @ace.renderer.getScrollTopRow()