mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
added achievement editor for #2304
This commit is contained in:
parent
63fa2f86d4
commit
1a60b004a7
3 changed files with 8 additions and 1 deletions
|
@ -6,4 +6,5 @@ module.exports = class PatchesCollection extends CocoCollection
|
|||
|
||||
initialize: (models, options, forModel, @status='pending') ->
|
||||
super(arguments...)
|
||||
@url = "#{forModel.urlRoot}/#{forModel.get('original')}/patches?status=#{@status}"
|
||||
identifier = if not forModel.get('original') then '_id' else 'original'
|
||||
@url = "#{forModel.urlRoot}/#{forModel.get(identifier)}/patches?status=#{@status}"
|
||||
|
|
|
@ -23,6 +23,9 @@ block content
|
|||
|
||||
#achievement-view.clearfix
|
||||
|
||||
h3(data-i18n="resources.patches") Patches
|
||||
.patches-view
|
||||
|
||||
hr
|
||||
|
||||
else
|
||||
|
|
|
@ -3,6 +3,7 @@ template = require 'templates/editor/achievement/edit'
|
|||
Achievement = require 'models/Achievement'
|
||||
AchievementPopup = require 'views/core/AchievementPopup'
|
||||
ConfirmModal = require 'views/editor/modal/ConfirmModal'
|
||||
PatchesView = require 'views/editor/PatchesView'
|
||||
errors = require 'core/errors'
|
||||
app = require 'core/application'
|
||||
nodes = require 'views/editor/level/treema_nodes'
|
||||
|
@ -57,6 +58,8 @@ module.exports = class AchievementEditView extends RootView
|
|||
super()
|
||||
return unless @supermodel.finished()
|
||||
@pushChangesToPreview()
|
||||
@patchesView = @insertSubView(new PatchesView(@achievement), @$el.find('.patches-view'))
|
||||
@patchesView.load()
|
||||
|
||||
pushChangesToPreview: =>
|
||||
return unless @treema
|
||||
|
|
Loading…
Reference in a new issue