mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Improved logging (winston) and admin-only'd the achievement editor
This commit is contained in:
parent
5aa211cabd
commit
7096a07ce8
4 changed files with 3 additions and 10 deletions
app
|
@ -37,6 +37,7 @@ block content
|
|||
h3(data-i18n="play_level.tip_reticulating") Reticulating Splines...
|
||||
.progress.progress-striped.active
|
||||
.progress-bar
|
||||
|
||||
else
|
||||
.alert.alert-danger
|
||||
span Admin only. Turn around.
|
||||
|
|
|
@ -46,7 +46,6 @@ module.exports = class AchievementEditView extends View
|
|||
@treema = @$el.find('#achievement-treema').treema(options)
|
||||
|
||||
@treema.build()
|
||||
console.log @treema
|
||||
|
||||
pushChangesToPreview: =>
|
||||
'TODO' # TODO might want some intrinsic preview thing
|
||||
|
|
|
@ -8,13 +8,6 @@ module.exports = class AchievementSearchView extends SearchView
|
|||
tableTemplate: require 'templates/editor/achievement/table'
|
||||
projection: ['name', 'description', 'collection', 'slug']
|
||||
|
||||
initialize: ->
|
||||
console.log me.isAdmin()
|
||||
unless me.isAdmin()
|
||||
NotFoundView = require '../../not_found'
|
||||
return new NotFoundView
|
||||
else super()
|
||||
|
||||
getRenderData: ->
|
||||
context = super()
|
||||
context.currentEditor = 'editor.achievement_title'
|
||||
|
|
|
@ -38,8 +38,8 @@ module.exports = class RootView extends CocoView
|
|||
me.set(val, me.get(val) + 1)
|
||||
console.debug me.get(val)
|
||||
me.save()
|
||||
test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
|
||||
test.fetch(success:@showNewAchievement)
|
||||
#test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
|
||||
#test.fetch(success:@showNewAchievement)
|
||||
|
||||
showNewAchievement: (achievement) ->
|
||||
currentLevel = me.level()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue