mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Fixed #1297.
This commit is contained in:
parent
7a9c53e424
commit
40aa95ba16
1 changed files with 10 additions and 1 deletions
|
@ -68,10 +68,19 @@ module.exports = class LevelComponentEditView extends CocoView
|
|||
null
|
||||
|
||||
buildConfigSchemaTreema: ->
|
||||
configSchema = @levelComponent.get 'configSchema'
|
||||
if configSchema.properties
|
||||
# Alphabetize (#1297)
|
||||
propertyNames = _.keys configSchema.properties
|
||||
propertyNames.sort()
|
||||
orderedProperties = {}
|
||||
for prop in propertyNames
|
||||
orderedProperties[prop] = configSchema.properties[prop]
|
||||
configSchema.properties = orderedProperties
|
||||
treemaOptions =
|
||||
supermodel: @supermodel
|
||||
schema: LevelComponent.schema.properties.configSchema
|
||||
data: @levelComponent.get 'configSchema'
|
||||
data: configSchema
|
||||
readOnly: me.get('anonymous')
|
||||
callbacks: {change: @onConfigSchemaEdited}
|
||||
@configSchemaTreema = @$el.find('#config-schema-treema').treema treemaOptions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue