mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 02:55:43 -05:00
commit
9b112e0662
5 changed files with 17 additions and 11 deletions
|
@ -107,7 +107,11 @@ UserSchema = c.object {},
|
||||||
name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'}
|
name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'}
|
||||||
link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'}
|
link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'}
|
||||||
photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'}
|
photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'}
|
||||||
curated: c.object {title: 'Curated', required: ['mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']},
|
curated: c.object {title: 'Curated', required: ['shortDescription','mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']},
|
||||||
|
shortDescription:
|
||||||
|
title: 'Short description'
|
||||||
|
description: 'A sentence or two describing the candidate'
|
||||||
|
type: 'string'
|
||||||
mainTag:
|
mainTag:
|
||||||
title: 'Main tag'
|
title: 'Main tag'
|
||||||
description: 'A main tag to describe this candidate'
|
description: 'A main tag to describe this candidate'
|
||||||
|
|
|
@ -193,7 +193,7 @@ me.codeSnippet = (mode) ->
|
||||||
return snippet =
|
return snippet =
|
||||||
code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'}
|
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'}
|
# 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', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'}
|
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"},
|
me.activity = me.object {description: "Stats on an activity"},
|
||||||
first: me.date()
|
first: me.date()
|
||||||
|
|
|
@ -93,7 +93,7 @@ module.exports = class SpellPaletteView extends View
|
||||||
tabbify = count >= 10
|
tabbify = count >= 10
|
||||||
@entries = []
|
@entries = []
|
||||||
|
|
||||||
Backbone.Mediator.publish 'tome:update-snippets', propGroups: propGroups, allDocs: allDocs
|
Backbone.Mediator.publish 'tome:update-snippets', propGroups: propGroups, allDocs: allDocs, language: @options.language
|
||||||
|
|
||||||
for owner, props of propGroups
|
for owner, props of propGroups
|
||||||
for prop in props
|
for prop in props
|
||||||
|
|
|
@ -96,6 +96,7 @@ module.exports = class SpellView extends View
|
||||||
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
||||||
$(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
$(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||||
@zatanna = new Zatanna @ace,
|
@zatanna = new Zatanna @ace,
|
||||||
|
|
||||||
liveCompletion: aceConfig.liveCompletion ? true
|
liveCompletion: aceConfig.liveCompletion ? true
|
||||||
completers:
|
completers:
|
||||||
keywords: false
|
keywords: false
|
||||||
|
@ -180,16 +181,17 @@ module.exports = class SpellView extends View
|
||||||
return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this')
|
return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this')
|
||||||
console.log 'could not find doc for', prop, 'from', e.allDocs['__' + prop], 'for', owner, 'of', e.propGroups unless doc
|
console.log 'could not find doc for', prop, 'from', e.allDocs['__' + prop], 'for', owner, 'of', e.propGroups unless doc
|
||||||
doc ?= prop
|
doc ?= prop
|
||||||
if doc.snippets?[@spell.language]
|
if doc.snippets?[e.language]
|
||||||
entry =
|
entry =
|
||||||
content: doc.snippets[@spell.language].code
|
content: doc.snippets[e.language].code
|
||||||
name: doc.name
|
name: doc.name
|
||||||
tabTrigger: doc.snippets[@spell.language].tab
|
tabTrigger: doc.snippets[e.language].tab
|
||||||
snippetEntries.push entry
|
snippetEntries.push entry
|
||||||
|
|
||||||
window.zatanna = @zatanna
|
# window.zatanna = @zatanna
|
||||||
window.snippetEntries = snippetEntries
|
# window.snippetEntries = snippetEntries
|
||||||
@zatanna.addSnippets snippetEntries, @spell.language
|
lang = @editModes[e.language].substr 'ace/mode/'.length
|
||||||
|
@zatanna.addSnippets snippetEntries, lang
|
||||||
|
|
||||||
onMultiplayerChanged: ->
|
onMultiplayerChanged: ->
|
||||||
if @session.get('multiplayer')
|
if @session.get('multiplayer')
|
||||||
|
@ -652,7 +654,7 @@ module.exports = class SpellView extends View
|
||||||
onChangeLanguage: (e) ->
|
onChangeLanguage: (e) ->
|
||||||
return unless @spell.canWrite()
|
return unless @spell.canWrite()
|
||||||
@aceSession.setMode @editModes[e.language]
|
@aceSession.setMode @editModes[e.language]
|
||||||
@zatanna.set 'language', @editModes[e.language].substr('ace/mode/')
|
# @zatanna.set 'language', @editModes[e.language].substr('ace/mode/')
|
||||||
wasDefault = @getSource() is @spell.originalSource
|
wasDefault = @getSource() is @spell.originalSource
|
||||||
@spell.setLanguage e.language
|
@spell.setLanguage e.language
|
||||||
@reloadCode true if wasDefault
|
@reloadCode true if wasDefault
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
"bootstrap": "~3.1.1",
|
"bootstrap": "~3.1.1",
|
||||||
"validated-backbone-mediator": "~0.1.3",
|
"validated-backbone-mediator": "~0.1.3",
|
||||||
"jquery.browser": "~0.0.6",
|
"jquery.browser": "~0.0.6",
|
||||||
"zatanna": "~0.0.1"
|
"zatanna": "~0.0.2"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"backbone": {
|
"backbone": {
|
||||||
|
|
Loading…
Reference in a new issue