mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-04 09:53:55 -04:00
Merge branch 'master' into production
This commit is contained in:
commit
3735e434c6
5 changed files with 14 additions and 12 deletions
app
|
@ -17,12 +17,13 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
'': go('HomeView')
|
'': go('HomeView')
|
||||||
|
|
||||||
'about': go('AboutView')
|
'about': go('AboutView')
|
||||||
|
|
||||||
'account': go('account/MainAccountView')
|
'account': go('account/MainAccountView')
|
||||||
'account/settings': go('account/AccountSettingsView')
|
'account/settings': go('account/AccountSettingsView')
|
||||||
'account/unsubscribe': go('account/UnsubscribeView')
|
'account/unsubscribe': go('account/UnsubscribeView')
|
||||||
|
'account/profile': go('user/JobProfileView') # legacy URL, sent in emails
|
||||||
#'account/payment'
|
#'account/payment'
|
||||||
|
|
||||||
'admin': go('admin/MainAdminView')
|
'admin': go('admin/MainAdminView')
|
||||||
'admin/candidates': go('admin/CandidatesView')
|
'admin/candidates': go('admin/CandidatesView')
|
||||||
'admin/clas': go('admin/CLAsView')
|
'admin/clas': go('admin/CLAsView')
|
||||||
|
@ -35,7 +36,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
|
|
||||||
'cla': go('CLAView')
|
'cla': go('CLAView')
|
||||||
'community': go('CommunityView')
|
'community': go('CommunityView')
|
||||||
|
|
||||||
'contribute': go('contribute/MainContributeView')
|
'contribute': go('contribute/MainContributeView')
|
||||||
'contribute/adventurer': go('contribute/AdventurerView')
|
'contribute/adventurer': go('contribute/AdventurerView')
|
||||||
'contribute/ambassador': go('contribute/AmbassadorView')
|
'contribute/ambassador': go('contribute/AmbassadorView')
|
||||||
|
@ -47,7 +48,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
'db/*path': 'routeToServer'
|
'db/*path': 'routeToServer'
|
||||||
'demo(/*subpath)': go('DemoView')
|
'demo(/*subpath)': go('DemoView')
|
||||||
'docs/components': go('docs/ComponentDocumentationView')
|
'docs/components': go('docs/ComponentDocumentationView')
|
||||||
|
|
||||||
'editor': go('editor/MainEditorView')
|
'editor': go('editor/MainEditorView')
|
||||||
|
|
||||||
'editor/achievement': go('editor/achievement/AchievementSearchView')
|
'editor/achievement': go('editor/achievement/AchievementSearchView')
|
||||||
|
@ -59,13 +60,13 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
'editor/level/:levelID': go('editor/level/LevelEditView')
|
'editor/level/:levelID': go('editor/level/LevelEditView')
|
||||||
'editor/thang': go('editor/thang/ThangTypeSearchView')
|
'editor/thang': go('editor/thang/ThangTypeSearchView')
|
||||||
'editor/thang/:thangID': go('editor/thang/ThangTypeEditView')
|
'editor/thang/:thangID': go('editor/thang/ThangTypeEditView')
|
||||||
|
|
||||||
'employers': go('EmployersView')
|
'employers': go('EmployersView')
|
||||||
|
|
||||||
'file/*path': 'routeToServer'
|
'file/*path': 'routeToServer'
|
||||||
|
|
||||||
'legal': go('LegalView')
|
'legal': go('LegalView')
|
||||||
|
|
||||||
'multiplayer': go('MultiplayerView')
|
'multiplayer': go('MultiplayerView')
|
||||||
|
|
||||||
'play': go('play/MainPlayView')
|
'play': go('play/MainPlayView')
|
||||||
|
@ -77,7 +78,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
'preview': go('HomeView')
|
'preview': go('HomeView')
|
||||||
|
|
||||||
'teachers': go('TeachersView')
|
'teachers': go('TeachersView')
|
||||||
|
|
||||||
'test(/*subpath)': go('TestView')
|
'test(/*subpath)': go('TestView')
|
||||||
|
|
||||||
'user/:slugOrID': go('user/MainUserView')
|
'user/:slugOrID': go('user/MainUserView')
|
||||||
|
|
|
@ -75,7 +75,7 @@ block append content
|
||||||
td
|
td
|
||||||
a(href="/play/level/#{session.get('levelID')}")= session.get('levelName')
|
a(href="/play/level/#{session.get('levelID')}")= session.get('levelName')
|
||||||
td= moment(session.get('changed')).fromNow()
|
td= moment(session.get('changed')).fromNow()
|
||||||
if session.get('state').complete === true
|
if session.get('state') && session.get('state').complete === true
|
||||||
td(data-i18n="user.status_completed") Completed
|
td(data-i18n="user.status_completed") Completed
|
||||||
else
|
else
|
||||||
td(data-i18n="user.status_unfinished") Unfinished
|
td(data-i18n="user.status_unfinished") Unfinished
|
||||||
|
|
|
@ -436,7 +436,7 @@ module.exports = class ThangsTabView extends CocoView
|
||||||
else # Mediator event
|
else # Mediator event
|
||||||
window.thangsTreema = @thangsTreema
|
window.thangsTreema = @thangsTreema
|
||||||
thangData = @thangsTreema.get "id=#{e.thangID}"
|
thangData = @thangsTreema.get "id=#{e.thangID}"
|
||||||
@editThangView = new LevelThangEditView thangData: thangData, supermodel: @supermodel, level: @level, world: @world
|
@editThangView = new LevelThangEditView thangData: thangData, level: @level, world: @world
|
||||||
@insertSubView @editThangView
|
@insertSubView @editThangView
|
||||||
@$el.find('.thangs-column').hide()
|
@$el.find('.thangs-column').hide()
|
||||||
Backbone.Mediator.publish 'level:view-switched', e
|
Backbone.Mediator.publish 'level:view-switched', e
|
||||||
|
|
|
@ -9,6 +9,7 @@ module.exports = class UserView extends RootView
|
||||||
|
|
||||||
constructor: (@userID, options) ->
|
constructor: (@userID, options) ->
|
||||||
super options
|
super options
|
||||||
|
@userID ?= me.id
|
||||||
@listenTo @, 'userNotFound', @ifUserNotFound
|
@listenTo @, 'userNotFound', @ifUserNotFound
|
||||||
@fetchUser @userID
|
@fetchUser @userID
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ module.exports = class JobProfileView extends UserView
|
||||||
@render()
|
@render()
|
||||||
super options, userID
|
super options, userID
|
||||||
|
|
||||||
onUserLoaded: ->
|
onLoaded: ->
|
||||||
@finishInit() unless @destroyed
|
@finishInit() unless @destroyed
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ module.exports = class JobProfileView extends UserView
|
||||||
_.delay ->
|
_.delay ->
|
||||||
justSavedSection.removeClass 'just-saved', duration: 1500, easing: 'easeOutQuad'
|
justSavedSection.removeClass 'just-saved', duration: 1500, easing: 'easeOutQuad'
|
||||||
, 500
|
, 500
|
||||||
if me.isAdmin() and @user
|
if me.isAdmin() and @user and @remark
|
||||||
visibleSettings = ['history', 'tasks']
|
visibleSettings = ['history', 'tasks']
|
||||||
data = _.pick (@remark.attributes), (value, key) -> key in visibleSettings
|
data = _.pick (@remark.attributes), (value, key) -> key in visibleSettings
|
||||||
data.history ?= []
|
data.history ?= []
|
||||||
|
@ -530,7 +530,7 @@ module.exports = class JobProfileView extends UserView
|
||||||
console.log 'Saved UserRemark', @remark, 'with response', response
|
console.log 'Saved UserRemark', @remark, 'with response', response
|
||||||
|
|
||||||
updateProgress: (highlightNext) ->
|
updateProgress: (highlightNext) ->
|
||||||
return unless @user
|
return unless @user?.loaded
|
||||||
completed = 0
|
completed = 0
|
||||||
totalWeight = 0
|
totalWeight = 0
|
||||||
next = null
|
next = null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue