Roo/doc/Synopsis.js
[roojs1] / Roo / doc / Synopsis.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.Synopsis
8  * @extends Roo.bootstrap.Component
9  * Synopsis Element class
10  * @cfg {String} returntype return value
11  * @cfg {String} name title really..
12  * @cfg {String} stype (function|constant)
13  * 
14  * @constructor
15  * Create a new Synopsis
16  * @param {Object} config The config object
17  */
18
19 Roo.doc.Synopsis = function(config){
20     Roo.doc.Synopsis.superclass.constructor.call(this, config);
21 };
22
23 Roo.extend(Roo.doc.Synopsis, Roo.bootstrap.Component,  {
24     
25     
26     returntype : '',
27     name: '',
28     stype:   'function',
29      
30     getAutoCreate : function(){
31         
32         var cfg ={
33             tag: 'h2',
34             cls : 'refsynopsisdiv',
35             cn : [
36                 {
37                     cls: 'funcsynopsis',
38                     cn: [
39                         {
40                             tag: 'p',
41                             cn: {
42                                 tag:'code',
43                                 cls : 'funcprototype',
44                                 cn: [
45                                     this.returntype + ' ',
46                                     {
47                                         tag: 'strong',
48                                         cls : this.stype,
49                                         html : this.name
50                                     },
51                                     '(',
52                                     {
53                                         tag: 'span',
54                                         cls : 'roo-params'
55                                     },
56                                     ')'
57                                 ]
58                                 
59                             }
60                         }
61                     ]
62                 }
63                 
64             ]
65         };
66         
67         
68         
69         return cfg;
70     },
71     getChildContainer : function(build_call)
72     {
73          
74         
75         return this.el.select('.roo-params',true).first();
76     }
77     
78     
79     
80     
81    
82 });
83
84  
85
86