Merge branch 'master' into production

This commit is contained in:
Scott Erickson 2014-07-06 15:06:30 -07:00
commit fd4235fc84
8 changed files with 32 additions and 17 deletions

View file

@ -63,7 +63,7 @@ var console = {
console.error = console.warn = console.info = console.debug = console.log;
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"];
for(var i = 0; i < restricted.length; ++i) {

View file

@ -34,7 +34,7 @@ module.exports = class Angel extends CocoClass
# say: debugging stuff, usually off; log: important performance indicators, keep on
say: (args...) -> #@log args...
log: (args...) -> console.log "|#{@shared.godNick}'s #{@nick}|", args...
log: (args...) -> console.info "|#{@shared.godNick}'s #{@nick}|", args...
testWorker: =>
return if @destroyed

View file

@ -107,7 +107,7 @@ UserSchema = c.object {},
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'}
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: ['shortDescription','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'
@ -118,17 +118,13 @@ UserSchema = c.object {},
type: 'string'
location:
title: 'Location'
description: "The CURRENT location of the candidate"
description: 'The CURRENT location of the candidate'
type: 'string'
education:
title: 'Education'
description: 'The main educational institution of the candidate'
type: 'string'
workHistory: c.array
title: 'Work history'
description: 'One or two places the candidate has worked'
type: 'array'
,
workHistory: c.array {title: 'Work history', description: 'One or two places the candidate has worked', type: 'array'},
title: 'Workplace'
type: 'string'
phoneScreenFilter:

View file

@ -1,4 +1,4 @@
#docs-modal .modal-dialog
#docs-modal .modal-dialog, #settings-treema .treema-markdown
width: 800px
.tab-content
@ -11,11 +11,15 @@
display: block
margin: 0 auto
em
img + em
display: block
margin: 0 auto
text-align: center
hr
border-color: #5c5c5c
width: 80%
width: 80%
table
width: 80%
margin: 20px 10%

View file

@ -47,9 +47,20 @@ block header
a
span.glyphicon-floppy-disk.glyphicon
li(title="⌃↩ or ⌘↩: Play preview of current level")#play-button
a
span.glyphicon-play.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
a
span.glyphicon-play.glyphicon
li.dropdown
a(data-toggle='dropdown')
span.glyphicon-chevron-down.glyphicon

View file

@ -25,6 +25,7 @@ module.exports = class EditorLevelView extends View
events:
'click #play-button': 'onPlayLevel'
'click .play-with-team-button': 'onPlayLevel'
'click #commit-level-start-button': 'startCommittingLevel'
'click #fork-level-start-button': 'startForkingLevel'
'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()
onPlayLevel: (e) ->
team = $(e.target).data('team')
sendLevel = =>
@childWindow.Backbone.Mediator.publish 'level-reload-from-data', level: @level, supermodel: @supermodel
if @childWindow and not @childWindow.closed
@ -85,6 +87,7 @@ module.exports = class EditorLevelView extends View
else
# Create a new Window with a blank LevelView
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.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack
@childWindow.focus()

View file

@ -18,6 +18,7 @@ exports.config =
|(app[\/\\]lib[\/\\]utils.coffee)
|(vendor[\/\\]scripts[\/\\]Box2dWeb-2.1.a.3)
|(vendor[\/\\]scripts[\/\\]string_score.js)
|(bower_components[\/\\]underscore.string)
)///
'javascripts/app.js': /^app/
'javascripts/vendor.js': ///^(

View file

@ -8,7 +8,7 @@ achievements = {}
module.exports = AchievablePlugin = (schema, options) ->
User = require '../users/User' # Avoid mutual inclusion cycles
Achievement = require('../achievements/Achievement')
Achievement = require '../achievements/Achievement'
checkForAchievement = (doc) ->
collectionName = doc.constructor.modelName
@ -85,7 +85,7 @@ module.exports = AchievablePlugin = (schema, options) ->
module.exports.loadAchievements = ->
achievements = {}
Achievement = require('../achievements/Achievement')
Achievement = require '../achievements/Achievement'
query = Achievement.find({})
query.exec (err, docs) ->
_.each docs, (achievement) ->