mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 00:31:21 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
3d024ce349
8 changed files with 55 additions and 21 deletions
|
@ -102,7 +102,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
|
|||
blog: "Blog"
|
||||
forum: "Fórum"
|
||||
account: "Fiók"
|
||||
# my_account: "My Account"
|
||||
my_account: "Fiókom"
|
||||
profile: "Profil"
|
||||
stats: "Statisztika"
|
||||
code: "Kód"
|
||||
|
@ -112,18 +112,18 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
|
|||
about: "Rólunk"
|
||||
contact: "Kapcsolat"
|
||||
twitter_follow: "Követés"
|
||||
# students: "Students"
|
||||
students: "Diákok"
|
||||
teachers: "Tanárok"
|
||||
careers: "Karrier"
|
||||
# facebook: "Facebook"
|
||||
# twitter: "Twitter"
|
||||
facebook: "Facebook"
|
||||
twitter: "Twitter"
|
||||
create_a_class: "Hozz létre egy Osztályt"
|
||||
other: "Egyéb"
|
||||
learn_to_code: "Tanulj meg Kódolni!"
|
||||
# toggle_nav: "Toggle navigation"
|
||||
# jobs: "Jobs"
|
||||
# schools: "Schools"
|
||||
# educator_wiki: "Educator Wiki"
|
||||
jobs: "Állások"
|
||||
schools: "Iskolák"
|
||||
educator_wiki: "Oktatói Wiki"
|
||||
# get_involved: "Get Involved"
|
||||
# open_source: "Open source (GitHub)"
|
||||
# support: "Support"
|
||||
|
@ -132,8 +132,8 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
|
|||
# help_suff: "and we'll get in touch!"
|
||||
|
||||
modal:
|
||||
# cancel: "Cancel"
|
||||
close: "Mégse"
|
||||
cancel: "Mégse"
|
||||
close: "Bezár"
|
||||
okay: "Oké"
|
||||
|
||||
not_found:
|
||||
|
@ -390,7 +390,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
|
|||
subject: "Tárgy"
|
||||
email: "E-mail"
|
||||
password: "Jelszó"
|
||||
# confirm_password: "Confirm Password"
|
||||
confirm_password: "Jelszó megerősítése"
|
||||
message: "Üzenet"
|
||||
code: "Kód"
|
||||
ladder: "Ranglétra"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#systems-documentation-view
|
||||
background-color: #e4cf8c
|
||||
height: 100%
|
||||
height: calc(100% - 90px)
|
||||
|
||||
#toggle-all-system-code
|
||||
margin: 10px
|
||||
|
|
|
@ -13,6 +13,10 @@ $level-resize-transition-time: 0.5s
|
|||
&.real-time
|
||||
// Hmm, somehow the #page-container is cutting us off by ~17px on the right, looks a bit off.
|
||||
|
||||
&.real-time.game-dev
|
||||
#canvas-wrapper
|
||||
width: 80%
|
||||
|
||||
#canvas-wrapper
|
||||
width: 100%
|
||||
canvas
|
||||
|
@ -295,6 +299,13 @@ $level-resize-transition-time: 0.5s
|
|||
left: 0
|
||||
bottom: 0
|
||||
|
||||
#how-to-play-game-dev-panel
|
||||
position: absolute
|
||||
right: 0
|
||||
top: 52px
|
||||
width: 20%
|
||||
bottom: 38px
|
||||
|
||||
html.fullscreen-editor
|
||||
#level-view
|
||||
#fullscreen-editor-background-screen
|
||||
|
|
|
@ -56,7 +56,7 @@ if view.showAds()
|
|||
else
|
||||
span(data-i18n="play_level.skip")
|
||||
|
||||
#how-to-play-game-dev-panel.panel.panel-default.hide
|
||||
#how-to-play-game-dev-panel.panel.panel-default.hide.style-flat
|
||||
.panel-heading
|
||||
h3.panel-title How to play:
|
||||
.panel-body
|
||||
|
|
|
@ -165,7 +165,7 @@ module.exports = class LevelEditView extends RootView
|
|||
if me.get('name') is 'Nick'
|
||||
@childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=2560,height=1080,left=0,top=-1600,location=1,menubar=1,scrollbars=1,status=0,titlebar=1,toolbar=1', true)
|
||||
else
|
||||
@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=1280,height=640,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()
|
||||
|
||||
|
|
|
@ -635,7 +635,22 @@ module.exports = class PlayLevelView extends RootView
|
|||
# Real-time playback
|
||||
onRealTimePlaybackStarted: (e) ->
|
||||
@$el.addClass('real-time').focus()
|
||||
@$('#how-to-play-game-dev-panel').removeClass('hide') if @level.isType('game-dev')
|
||||
if @level.isType('game-dev')
|
||||
panel = @$('#how-to-play-game-dev-panel')
|
||||
panel.removeClass('hide')
|
||||
lines = switch @level.get('slug')
|
||||
when 'over-the-garden-wall' then ['Watch to see if the peasants are properly protected.']
|
||||
when 'click-gait' then ['Move to each red "X".', 'Click on the screen to move the Knight there.']
|
||||
when 'heros-journey' then ['Move to each red "X".', 'Click on the screen to move the Knight there.']
|
||||
when 'a-maze-ing' then ['Move to the chest of gems.', 'Click on the screen to move the Duelist there.']
|
||||
when 'gemtacular' then ['Move to each of the gems.', 'Click on the screen to move the Captain there.']
|
||||
when 'vorpal-mouse' then ['Slay the ogres.', 'Click on the screen to move the Guardian there.', 'Click on the munchkins to attack them!']
|
||||
when 'crushing-it' then ['Slay the ogres.', 'Click on the screen to move the Goliath there.', 'Click on the munchkins to attack them!']
|
||||
when 'tabula-rasa' then ['Slay any ogres.', 'Collect any coins.', 'Click on the screen to move the Raider there.', 'Click on any munchkins to attack them!']
|
||||
else ['Click to control your hero and win your game!']
|
||||
html = _.map(lines, (line) -> "<p>#{line}</p>").join('')
|
||||
panel.find('.panel-body').html(html)
|
||||
|
||||
@onWindowResize()
|
||||
|
||||
onRealTimePlaybackEnded: (e) ->
|
||||
|
|
|
@ -51,12 +51,14 @@ module.exports =
|
|||
getProjectFromReq: (req, options) ->
|
||||
options = _.extend({}, options)
|
||||
return null unless req.query.project
|
||||
projection = {}
|
||||
|
||||
if req.query.project is 'true'
|
||||
projection = {original: 1, name: 1, version: 1, description: 1, slug: 1, kind: 1, created: 1, permissions: 1}
|
||||
result = {}
|
||||
project = req.query.project
|
||||
if project is 'true'
|
||||
result = {original: 1, name: 1, version: 1, description: 1, slug: 1, kind: 1, created: 1, permissions: 1}
|
||||
else
|
||||
for field in req.query.project.split(',')
|
||||
projection[field] = 1
|
||||
if _.isString(project)
|
||||
project = project.split(',')
|
||||
for field in project
|
||||
result[field] = 1
|
||||
|
||||
return projection
|
||||
return result
|
||||
|
|
|
@ -29,6 +29,12 @@ describe 'GET /db/campaign', ->
|
|||
expect(body.length).toBe(4)
|
||||
done()
|
||||
|
||||
it 'accepts project parameter with [] notation', utils.wrap (done) ->
|
||||
[res, body] = yield request.getAsync getURL('/db/campaign?project[]=name&project[]=type'), { json: true }
|
||||
expect(res.statusCode).toBe(200)
|
||||
expect(res.body[0].slug).toBeUndefined()
|
||||
done()
|
||||
|
||||
describe 'with GET query param type', ->
|
||||
it 'returns campaigns of that type', utils.wrap (done) ->
|
||||
[res, body] = yield request.getAsync getURL('/db/campaign?type=course'), { json: true }
|
||||
|
|
Loading…
Reference in a new issue