Updates to go along with latest iPad app spell palette loading.

This commit is contained in:
Nick Winter 2014-09-08 21:40:52 -07:00
parent dd2cdf3ef9
commit 2396f9c26d
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ module.exports =
'tome:palette-updated': c.object {title: 'Palette Updated', description: 'Published when the spell palette has just been updated.'},
thangID: {type: 'string'}
entryGroups: {type: 'object', additionalProperties: {type: 'array', items: {type: 'object'}}}
entryGroups: {type: 'object', additionalProperties: {type: 'string'}}
'tome:palette-hovered': c.object {title: 'Palette Hovered', description: 'Published when you hover over a Thang in the spell palette', required: ['thang', 'prop', 'entry']},
thang: {type: 'object'}

View file

@ -140,7 +140,7 @@ module.exports = class SpellPaletteView extends CocoView
@entryGroupNames.this = thisName
iOSEntryGroups[thisName] = iOSEntryGroups.this
delete iOSEntryGroups.this
Backbone.Mediator.publish 'tome:palette-updated', entryGroups: iOSEntryGroups
Backbone.Mediator.publish 'tome:palette-updated', thangID: @thang.id, entryGroups: JSON.stringify(iOSEntryGroups) # TODO: make it sort these by granting items if it's a hero level
addEntry: (doc, shortenize, tabbify, isSnippet=false) ->
writable = (if _.isString(doc) then doc else doc.name) in (@thang.apiUserProperties ? [])