X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-doc-debug.js;h=d1a39ba30c427dcd2895b04c3de327de253c877b;hp=cdcac0f380d7b95089b68580ee5ec458a9385326;hb=refs%2Fheads%2Fwip_alan_T5944_trim_leading_white_space_from;hpb=6a440ac275b620b206ea888eb7568c67cacb79e2 diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index cdcac0f380..d1a39ba30c 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 @@ -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, '
'); - + 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 }, '(', { @@ -600,8 +614,9 @@ Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component, { Roo.doc.NavCategory = function(config){ Roo.doc.Para.superclass.constructor.call(this, config); + Roo.doc.NavCategory.registry[this.name] = this; }; - +Roo.doc.NavCategory.registry = {}; Roo.extend(Roo.doc.NavCategory, Roo.bootstrap.Component, { title : '', @@ -615,8 +630,10 @@ Roo.extend(Roo.doc.NavCategory, Roo.bootstrap.Component, { var cfg ={ cn : [ + { tag : 'a', + cls: 'roo-nav-category', href : '#' + this.name, html : this.title }, @@ -630,7 +647,7 @@ Roo.extend(Roo.doc.NavCategory, Roo.bootstrap.Component, { }, getChildContainer : function() { - return this.el.select('roo-child-ctr').first(); + return this.el.select('.roo-child-ctr',true).first(); }