From: Alan Knowles Date: Thu, 8 Sep 2016 09:06:20 +0000 (+0800) Subject: Roo/doc/Section.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=d5842aad27922cd5f8f60926711f173097a2ef40;p=roojs1 Roo/doc/Section.js --- diff --git a/Roo/doc/Section.js b/Roo/doc/Section.js new file mode 100644 index 0000000000..5e8063e150 --- /dev/null +++ b/Roo/doc/Section.js @@ -0,0 +1,67 @@ +/* + * - LGPL + * + */ + +/** + * @class Roo.doc.Section + * @extends Roo.bootstrap.Component + * SectionElement class + * @cfg {String} stype (desc|parameter|return|note|example) section type. + * + * @constructor + * Create a new Synopsis + * @param {Object} config The config object + */ + +Roo.mailer.Section = function(config){ + Roo.mailer.Section.superclass.constructor.call(this, config); +}; + +Roo.extend(Roo.mailer.Section, Roo.bootstrap.Component, { + + + stype: '', + + getAutoCreate : function(){ + + var cfg ={ + + cls : 'refsection', + // id... ? + cn : [ + { + tag: 'h1', + cls : 'title', + html : this.stype.charAt(0).toUpperCase() + this.stype.slice(1) //ucfirst + } + ] + } + if (this.stype == 'parameter') { + + // db package uses variable list here... - it results in dd/dl but the layout is messed up.. + cfg.cn.push({ + tag: 'ul', + cls: 'itemizedlist roo-params' + }) + } + + + return cfg; + }, + getChildContainer : function(build_call) + { + + if (this.stype == 'parameter') { + return this.el.select('.roo-params',true).first(); + } + return this.el; + } + + + +}); + + + + \ No newline at end of file