mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
fd4235fc84
8 changed files with 32 additions and 17 deletions
|
@ -63,7 +63,7 @@ var console = {
|
||||||
console.error = console.warn = console.info = console.debug = console.log;
|
console.error = console.warn = console.info = console.debug = console.log;
|
||||||
self.console = console;
|
self.console = console;
|
||||||
|
|
||||||
self.importScripts('/javascripts/world.js', '/javascripts/lodash.js', '/javascripts/aether.js');
|
self.importScripts('/javascripts/lodash.js', '/javascripts/world.js', '/javascripts/aether.js');
|
||||||
|
|
||||||
var restricted = ["XMLHttpRequest", "importScripts", "Worker"];
|
var restricted = ["XMLHttpRequest", "importScripts", "Worker"];
|
||||||
for(var i = 0; i < restricted.length; ++i) {
|
for(var i = 0; i < restricted.length; ++i) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ module.exports = class Angel extends CocoClass
|
||||||
|
|
||||||
# say: debugging stuff, usually off; log: important performance indicators, keep on
|
# say: debugging stuff, usually off; log: important performance indicators, keep on
|
||||||
say: (args...) -> #@log args...
|
say: (args...) -> #@log args...
|
||||||
log: (args...) -> console.log "|#{@shared.godNick}'s #{@nick}|", args...
|
log: (args...) -> console.info "|#{@shared.godNick}'s #{@nick}|", args...
|
||||||
|
|
||||||
testWorker: =>
|
testWorker: =>
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
|
|
|
@ -118,17 +118,13 @@ UserSchema = c.object {},
|
||||||
type: 'string'
|
type: 'string'
|
||||||
location:
|
location:
|
||||||
title: 'Location'
|
title: 'Location'
|
||||||
description: "The CURRENT location of the candidate"
|
description: 'The CURRENT location of the candidate'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
education:
|
education:
|
||||||
title: 'Education'
|
title: 'Education'
|
||||||
description: 'The main educational institution of the candidate'
|
description: 'The main educational institution of the candidate'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
workHistory: c.array
|
workHistory: c.array {title: 'Work history', description: 'One or two places the candidate has worked', type: 'array'},
|
||||||
title: 'Work history'
|
|
||||||
description: 'One or two places the candidate has worked'
|
|
||||||
type: 'array'
|
|
||||||
,
|
|
||||||
title: 'Workplace'
|
title: 'Workplace'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
phoneScreenFilter:
|
phoneScreenFilter:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#docs-modal .modal-dialog
|
#docs-modal .modal-dialog, #settings-treema .treema-markdown
|
||||||
width: 800px
|
width: 800px
|
||||||
|
|
||||||
.tab-content
|
.tab-content
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
display: block
|
display: block
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|
||||||
em
|
img + em
|
||||||
display: block
|
display: block
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
text-align: center
|
text-align: center
|
||||||
|
@ -19,3 +19,7 @@
|
||||||
hr
|
hr
|
||||||
border-color: #5c5c5c
|
border-color: #5c5c5c
|
||||||
width: 80%
|
width: 80%
|
||||||
|
|
||||||
|
table
|
||||||
|
width: 80%
|
||||||
|
margin: 20px 10%
|
|
@ -47,6 +47,17 @@ block header
|
||||||
a
|
a
|
||||||
span.glyphicon-floppy-disk.glyphicon
|
span.glyphicon-floppy-disk.glyphicon
|
||||||
|
|
||||||
|
if level.get('type') === 'ladder'
|
||||||
|
li.dropdown
|
||||||
|
a(data-toggle='dropdown')
|
||||||
|
span.glyphicon-play.glyphicon
|
||||||
|
ul.dropdown-menu
|
||||||
|
li.dropdown-header Play As Which Team?
|
||||||
|
li
|
||||||
|
for team in ['humans', 'ogres']
|
||||||
|
a.play-with-team-button(data-team=team)= team
|
||||||
|
|
||||||
|
else
|
||||||
li(title="⌃↩ or ⌘↩: Play preview of current level")#play-button
|
li(title="⌃↩ or ⌘↩: Play preview of current level")#play-button
|
||||||
a
|
a
|
||||||
span.glyphicon-play.glyphicon
|
span.glyphicon-play.glyphicon
|
||||||
|
|
|
@ -25,6 +25,7 @@ module.exports = class EditorLevelView extends View
|
||||||
|
|
||||||
events:
|
events:
|
||||||
'click #play-button': 'onPlayLevel'
|
'click #play-button': 'onPlayLevel'
|
||||||
|
'click .play-with-team-button': 'onPlayLevel'
|
||||||
'click #commit-level-start-button': 'startCommittingLevel'
|
'click #commit-level-start-button': 'startCommittingLevel'
|
||||||
'click #fork-level-start-button': 'startForkingLevel'
|
'click #fork-level-start-button': 'startForkingLevel'
|
||||||
'click #level-history-button': 'showVersionHistory'
|
'click #level-history-button': 'showVersionHistory'
|
||||||
|
@ -77,6 +78,7 @@ module.exports = class EditorLevelView extends View
|
||||||
@$el.find('#level-watch-button').find('> span').toggleClass('secret') if @level.watching()
|
@$el.find('#level-watch-button').find('> span').toggleClass('secret') if @level.watching()
|
||||||
|
|
||||||
onPlayLevel: (e) ->
|
onPlayLevel: (e) ->
|
||||||
|
team = $(e.target).data('team')
|
||||||
sendLevel = =>
|
sendLevel = =>
|
||||||
@childWindow.Backbone.Mediator.publish 'level-reload-from-data', level: @level, supermodel: @supermodel
|
@childWindow.Backbone.Mediator.publish 'level-reload-from-data', level: @level, supermodel: @supermodel
|
||||||
if @childWindow and not @childWindow.closed
|
if @childWindow and not @childWindow.closed
|
||||||
|
@ -85,6 +87,7 @@ module.exports = class EditorLevelView extends View
|
||||||
else
|
else
|
||||||
# Create a new Window with a blank LevelView
|
# Create a new Window with a blank LevelView
|
||||||
scratchLevelID = @level.get('slug') + '?dev=true'
|
scratchLevelID = @level.get('slug') + '?dev=true'
|
||||||
|
scratchLevelID += "&team=#{team}" if team
|
||||||
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true)
|
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true)
|
||||||
@childWindow.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack
|
@childWindow.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack
|
||||||
@childWindow.focus()
|
@childWindow.focus()
|
||||||
|
|
|
@ -18,6 +18,7 @@ exports.config =
|
||||||
|(app[\/\\]lib[\/\\]utils.coffee)
|
|(app[\/\\]lib[\/\\]utils.coffee)
|
||||||
|(vendor[\/\\]scripts[\/\\]Box2dWeb-2.1.a.3)
|
|(vendor[\/\\]scripts[\/\\]Box2dWeb-2.1.a.3)
|
||||||
|(vendor[\/\\]scripts[\/\\]string_score.js)
|
|(vendor[\/\\]scripts[\/\\]string_score.js)
|
||||||
|
|(bower_components[\/\\]underscore.string)
|
||||||
)///
|
)///
|
||||||
'javascripts/app.js': /^app/
|
'javascripts/app.js': /^app/
|
||||||
'javascripts/vendor.js': ///^(
|
'javascripts/vendor.js': ///^(
|
||||||
|
|
|
@ -8,7 +8,7 @@ achievements = {}
|
||||||
|
|
||||||
module.exports = AchievablePlugin = (schema, options) ->
|
module.exports = AchievablePlugin = (schema, options) ->
|
||||||
User = require '../users/User' # Avoid mutual inclusion cycles
|
User = require '../users/User' # Avoid mutual inclusion cycles
|
||||||
Achievement = require('../achievements/Achievement')
|
Achievement = require '../achievements/Achievement'
|
||||||
|
|
||||||
checkForAchievement = (doc) ->
|
checkForAchievement = (doc) ->
|
||||||
collectionName = doc.constructor.modelName
|
collectionName = doc.constructor.modelName
|
||||||
|
@ -85,7 +85,7 @@ module.exports = AchievablePlugin = (schema, options) ->
|
||||||
|
|
||||||
module.exports.loadAchievements = ->
|
module.exports.loadAchievements = ->
|
||||||
achievements = {}
|
achievements = {}
|
||||||
Achievement = require('../achievements/Achievement')
|
Achievement = require '../achievements/Achievement'
|
||||||
query = Achievement.find({})
|
query = Achievement.find({})
|
||||||
query.exec (err, docs) ->
|
query.exec (err, docs) ->
|
||||||
_.each docs, (achievement) ->
|
_.each docs, (achievement) ->
|
||||||
|
|
Loading…
Reference in a new issue