Roo/doc/Param.js
authorAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 07:03:14 +0000 (15:03 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 07:03:14 +0000 (15:03 +0800)
roojs-doc.js
roojs-doc-debug.js

Roo/doc/Param.js
roojs-doc-debug.js
roojs-doc.js

index 8d02577..3e7b009 100644 (file)
@@ -34,7 +34,7 @@ Roo.extend(Roo.doc.Param, Roo.bootstrap.Component,  {
         
         //?? this is the synopsis type....
         
-        var desc = Roo.Markdown.toHtml(this.desc)
+        var desc = Roo.Markdown.toHtml(this.desc);
         
         if (this.parent().stype == 'parameter') {
             
index f923844..6642098 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
@@ -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
                        ]
                    }
                ]
index 953704e..30ab3cf 100644 (file)
@@ -6,12 +6,12 @@ Roo.doc.Example=function(A){Roo.doc.Example.superclass.constructor.call(this,A);
 Roo.log("code="+A);var B={cls:'panel panel-info',cn:[{cls:'panel-heading',html:this.title},{cls:'panel-body',cn:[{tag:'pre',cls:'lang-'+this.lang,html:A}]}]};if(this.output){var C=hljs?hljs.highlight(this.outputlang,this.output).value:String.format('{0}',this.output).replace(/\n/g,'<br/>');
 B.cn.push({cls:'panel-footer',cn:{tag:'pre',html:C}});}return B;}});
 // Roo/doc/Para.js
-Roo.doc.Para=function(A){Roo.doc.Para.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Para,Roo.bootstrap.Component,{html:'',getAutoCreate:function(){var A={tag:'p',cls:'para',html:this.html};if(this.parent().is_list){return {tag:'li',cls:listitme,cn:[A]}
+Roo.doc.Para=function(A){Roo.doc.Para.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Para,Roo.bootstrap.Component,{html:'',getAutoCreate:function(){var A={tag:'p',cls:'para',html:Roo.Markdown.toHtml(this.html)};if(this.parent().is_list){return {tag:'li',cls:listitme,cn:[A]}
 ;}return A;}});
 // Roo/doc/Param.js
-Roo.doc.Param=function(A){Roo.doc.Param.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Param,Roo.bootstrap.Component,{is_optional:false,type:'',name:'',defaultvalue:'',desc:'',getAutoCreate:function(){if(this.parent().stype=='parameter'){return {tag:'li',cn:[{tag:'p',cls:'para',cn:[{tag:'code',html:this.type+' '+this.name}
-,this.desc]}]};}if(this.parent().stype=='return'){return {tag:'p',cls:'para',cn:[{tag:'code',html:this.type},this.desc]};}var A={tag:'span',cn:[this.is_optional?'[':'',this.type,' ',{tag:'b',html:this.name},this.defaultvalue==''?'':' = ',this.defaultvalue,this.is_optional?']':'',',']}
-;return A;},getAutoCreateParamSection:function(){return {tag:'li',cn:[{tag:'p',cls:'para',cn:[{tag:'code',html:this.type+' '+this.name},this.desc]}]};}});
+Roo.doc.Param=function(A){Roo.doc.Param.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Param,Roo.bootstrap.Component,{is_optional:false,type:'',name:'',defaultvalue:'',desc:'',getAutoCreate:function(){var A=Roo.Markdown.toHtml(this.desc);if(this.parent().stype=='parameter'){return {tag:'li',cn:[{tag:'p',cls:'para',cn:[{tag:'code',html:this.type+' '+this.name}
+,A]}]};}if(this.parent().stype=='return'){return {tag:'p',cls:'para',cn:[{tag:'code',html:this.type},A]};}var B={tag:'span',cn:[this.is_optional?'[':'',this.type,' ',{tag:'b',html:this.name},this.defaultvalue==''?'':' = ',this.defaultvalue,this.is_optional?']':'',',']}
+;return B;},getAutoCreateParamSection:function(){var A=Roo.Markdown.toHtml(this.desc);return {tag:'li',cn:[{tag:'p',cls:'para',cn:[{tag:'code',html:this.type+' '+this.name},A]}]};}});
 // Roo/doc/Section.js
 Roo.doc.Section=function(A){Roo.doc.Section.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Section,Roo.bootstrap.Component,{stype:'',getAutoCreate:function(){var A=Roo.factory(this.parent().items[0]);var B={cls:'refsection',cn:[{tag:'h3',cls:'title',html:Roo.doc.Section.map[this.stype]}
 ]};if(this.stype=='parameter'){var ul={tag:'ul',cls:'itemizedlist roo-params',cn:[]};var C=A.items;for(var i=0;i<C.length;i++){ul.cn.push(Roo.factory(C[i]).getAutoCreateParamSection())}B.cn.push(ul);}if(this.stype=='return'&&A.returndesc.length){B.cn.push({tag:'p',cls:'para',cn:[{tag:'code',cls:'parameter',html:A.returntype}