roojs-ui.js
[roojs1] / roojs-doc-debug.js
index 1c6d268..d1a39ba 100644 (file)
@@ -103,9 +103,10 @@ Roo.extend(Roo.doc.Entry, Roo.bootstrap.Component,  {
  * @extends Roo.bootstrap.Component
  * Example Element class
  * @cfg {String} title short title describing example
- * @cfg {String} lang (php|txt|sql) section type.
+ * @cfg {String} lang (php|txt|sql) code language.
  * @cfg {String} code  example code
  * @cfg {String} output The expected output from the code
+ * @cfg {String} outputlang php|txt|sql) output language
  *
  * 
  * @constructor
@@ -132,7 +133,7 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
         var code = hljs ? hljs.highlight(this.lang,this.code).value :
                 String.format('{0}',this.code).replace(/\n/g, '<br/>');
         
-        
+        Roo.log("code=" + code);
         var cfg ={
             cls : 'panel panel-info',
             cn : [
@@ -215,7 +216,7 @@ Roo.extend(Roo.doc.Para, Roo.bootstrap.Component,  {
         var cfg ={
             tag: 'p',
             cls: 'para',
-            html : this.html
+            html : Roo.Markdown.toHtml(this.html)
         };
          
         if (this.parent().is_list) {
@@ -275,6 +276,7 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
         
         //?? this is the synopsis type....
         
+        var desc = Roo.Markdown.toHtml(this.desc);
         
         if (this.parent().stype == 'parameter') {
             
@@ -289,7 +291,7 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
                                 tag: 'code',
                                 html : this.type + ' ' + this.name
                             },
-                            this.desc
+                            desc
                         ]
                     }
                 ]
@@ -305,7 +307,7 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
                             tag: 'code',
                             html : this.type
                         },
-                        this.desc
+                        desc
                     ]
                 };
                 
@@ -339,6 +341,9 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
     },
     getAutoCreateParamSection : function()
     {
+        var desc = Roo.Markdown.toHtml(this.desc);
+        
+      
         return {
                tag : 'li',
                cn : [
@@ -350,7 +355,7 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
                                tag: 'code',
                                html : this.type + ' ' + this.name
                            },
-                           this.desc
+                           desc
                        ]
                    }
                ]
@@ -429,7 +434,7 @@ Roo.extend(Roo.doc.Section, Roo.bootstrap.Component,  {
             
             cfg.cn.push(ul);
         }
-        if (this.stype == 'return' && syn.returndesc.length) {
+        if (this.stype == 'return' && (syn.returndesc.length || syn.returntype.length )) {
             
             cfg.cn.push({
                 tag: 'p',
@@ -469,7 +474,8 @@ Roo.doc.Section.map = {
     'parameter' : 'Parameters',
     'return' : 'Return Value',
     'note' : 'Notes',
-    'example' : 'Examples'
+    'example' : 'Examples',
+    'throws' : 'Throws Exception'
 }
 /*
  * - LGPL
@@ -486,6 +492,7 @@ Roo.doc.Section.map = {
  * @cfg {String} stype (function|constant)
  * @cfg {String} memberof class name
  * @cfg {bool} is_static is a static member
+ * @cfg {bool} is_constructor is a static member
  * 
  * @constructor
  * Create a new Synopsis
@@ -504,7 +511,8 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component,  {
     returndesc : '',
     name: '',
     stype:   'function',
-     
+    is_constructor : false,
+    
     getAutoCreate : function(){
         
         var syn = this.items[0]; // hopefully...
@@ -515,9 +523,15 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component,  {
             this.memberof +
             (this.is_static ? '::' : '->');
             
-         
+        var nm = this.name;
         // this should probably do the params....?? then we need to disable the rendering..
         
+        if (this.is_constructor) {
+            
+            nm = this.memberof;
+            nmp = 'new ';
+        }
+        
          
         var cfg ={
             tag: 'h5',
@@ -536,7 +550,7 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component,  {
                                     {
                                         tag: 'strong',
                                         cls : this.stype,
-                                        html : this.name
+                                        html : nm
                                     },
                                     '(',
                                     {