Roo/doc/Example.js
[roojs1] / Roo / doc / Example.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.Example
8  * @extends Roo.bootstrap.Example
9  * Example Element class
10  * @cfg {String} lang (phpcode|programlisting) section type.
11  * @cfg {String} code
12  *
13  * 
14  * @constructor
15  * Create a new Synopsis
16  * @param {Object} config The config object
17  */
18
19 Roo.mailer.Section = function(config){
20     Roo.mailer.Section.superclass.constructor.call(this, config);
21 };
22
23 Roo.extend(Roo.mailer.Section, Roo.bootstrap.Component,  {
24     
25     
26     stype:   '',
27      
28     getAutoCreate : function(){
29         
30         var cfg ={
31             
32             cls : 'refsection',
33             // id... ?
34             cn : [
35                 {
36                     tag: 'h1',
37                     cls : 'title',
38                     html : this.stype.charAt(0).toUpperCase() + this.stype.slice(1) //ucfirst
39                 }
40             ]
41         }
42         if (this.stype == 'parameter') {
43             
44             // db package uses variable list here... - it results in dd/dl but the layout is messed up..
45             cfg.cn.push({
46                 tag: 'ul',
47                 cls: 'itemizedlist roo-params'
48             })
49         }
50         
51         
52         return cfg;
53     },
54   
55     
56     
57    
58 });
59
60  
61
62