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
|
null
|
||||||
|
|
||||||
buildConfigSchemaTreema: ->
|
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 =
|
treemaOptions =
|
||||||
supermodel: @supermodel
|
supermodel: @supermodel
|
||||||
schema: LevelComponent.schema.properties.configSchema
|
schema: LevelComponent.schema.properties.configSchema
|
||||||
data: @levelComponent.get 'configSchema'
|
data: configSchema
|
||||||
readOnly: me.get('anonymous')
|
readOnly: me.get('anonymous')
|
||||||
callbacks: {change: @onConfigSchemaEdited}
|
callbacks: {change: @onConfigSchemaEdited}
|
||||||
@configSchemaTreema = @$el.find('#config-schema-treema').treema treemaOptions
|
@configSchemaTreema = @$el.find('#config-schema-treema').treema treemaOptions
|
||||||
|
|
Reference in a new issue