From: Alan Knowles Date: Tue, 25 Oct 2016 07:03:14 +0000 (+0800) Subject: Roo/doc/Param.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=12e453078bf2a7521c4ea233d7310d13d0b2574f Roo/doc/Param.js roojs-doc.js roojs-doc-debug.js --- diff --git a/Roo/doc/Param.js b/Roo/doc/Param.js index 8d025779a3..3e7b009050 100644 --- a/Roo/doc/Param.js +++ b/Roo/doc/Param.js @@ -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') { diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index f923844f93..6642098167 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -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 ] } ] diff --git a/roojs-doc.js b/roojs-doc.js index 953704e671..30ab3cf66b 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -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,'
'); 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