7 * @class Roo.doc.Section
8 * @extends Roo.bootstrap.Component
10 * @cfg {String} stype (desc|parameter|return|note|example) section type.
13 * Create a new Synopsis
14 * @param {Object} config The config object
17 Roo.doc.Section = function(config){
18 Roo.doc.Section.superclass.constructor.call(this, config);
21 Roo.extend(Roo.doc.Section, Roo.bootstrap.Component, {
26 getAutoCreate : function(){
29 var syn = Roo.factory(this.parent().items[0]);
39 html : Roo.doc.Section.map[this.stype]
43 if (this.stype == 'parameter') {
45 // db package uses variable list here... - it results in dd/dl but the layout is messed up..
49 cls: 'itemizedlist roo-params',
52 // might not have any..
53 var params = syn.items;
54 for (var i =0; i < params.length;i++) {
55 ul.cn.push( Roo.factory(params[i]).getAutoCreateParamSection() )
61 if (this.stype == 'return' && (syn.returndesc.length || syn.returntype.length )) {
81 getChildContainer : function(build_call)
84 if (this.stype == 'parameter') {
85 return this.el.select('.roo-params',true).first();
96 Roo.doc.Section.map = {
97 'desc' : 'Description',
98 'parameter' : 'Parameters',
99 'return' : 'Return Value',
101 'example' : 'Examples',
102 'throws' : 'Throws Exception'