diff --git a/app/assets/javascripts/workers/worker_world.js b/app/assets/javascripts/workers/worker_world.js index 605ddeacd..78331cbb8 100644 --- a/app/assets/javascripts/workers/worker_world.js +++ b/app/assets/javascripts/workers/worker_world.js @@ -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) { diff --git a/app/lib/Angel.coffee b/app/lib/Angel.coffee index 5c079d3b3..4beeffa97 100644 --- a/app/lib/Angel.coffee +++ b/app/lib/Angel.coffee @@ -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 diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 08401b03b..a144494e1 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -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: diff --git a/app/styles/play/level/modal/docs.sass b/app/styles/play/level/modal/docs.sass index 51be8378d..f126a182d 100644 --- a/app/styles/play/level/modal/docs.sass +++ b/app/styles/play/level/modal/docs.sass @@ -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% \ No newline at end of file + width: 80% + + table + width: 80% + margin: 20px 10% \ No newline at end of file diff --git a/app/templates/editor/level/edit.jade b/app/templates/editor/level/edit.jade index c2dfbac6f..d04b8f4bd 100644 --- a/app/templates/editor/level/edit.jade +++ b/app/templates/editor/level/edit.jade @@ -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 diff --git a/app/views/editor/level/edit.coffee b/app/views/editor/level/edit.coffee index c81e7f708..eb9e879c0 100644 --- a/app/views/editor/level/edit.coffee +++ b/app/views/editor/level/edit.coffee @@ -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() diff --git a/config.coffee b/config.coffee index 697a621de..940a8e688 100644 --- a/config.coffee +++ b/config.coffee @@ -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': ///^( diff --git a/server/plugins/achievements.coffee b/server/plugins/achievements.coffee index 0e4d448c0..431775268 100644 --- a/server/plugins/achievements.coffee +++ b/server/plugins/achievements.coffee @@ -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) ->