Merge pull request #1338 from Darredevil/master

language sensitive docs added
This commit is contained in:
Nick Winter 2014-07-16 17:35:17 -07:00
commit c6656f1a2d
2 changed files with 15 additions and 2 deletions

View file

@ -26,5 +26,8 @@ block content
li(id="#{component.get('name')}#{doc.name}")
| #{doc.name}
ul.specialList
li!=marked(doc.description)
if doc.description[language.substring(1,language.length-1)]
li!=marked(doc.description[language.substring(1,language.length-1)])
else
li!=marked(doc.description)

View file

@ -19,10 +19,20 @@ module.exports = class UnnamedView extends RootView
onLoaded: ->
console.log 'we have the components...', (c.get('name') for c in @componentDocs.models)
console.log 'we have the attributes...', (c.attributes for c in @componentDocs.models)
if (me.get('aceConfig')?.language?) is false
console.log 'default language javascript'
else
console.log 'language is =', me.get('aceConfig').language
#console.log 'test', @componentDocs.models[99].attributes.propertyDocumentation[1].description['python']
super()
getRenderData: ->
c = super()
c.components = @componentDocs.models
c.marked = marked
if (me.get('aceConfig')?.language?) is false
c.language = 'javascript'
else
c.language = JSON.stringify(me.get('aceConfig').language)
c