Merge branch 'master' into production
This commit is contained in:
commit
3735e434c6
5 changed files with 14 additions and 12 deletions
app
|
@ -21,6 +21,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
'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')
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in a new issue