Roo/doc/Param.js
[roojs1] / Roo / doc / Entry.js
1 /*
2  * - LGPL
3  *
4  *  Documentation - designed to generate HTML+Docbook!?!
5  */
6 Roo.doc = Roo.doc || {};
7
8 /**
9  * @class Roo.doc.Entry
10  * @extends Roo.bootstrap.Component
11  * Entry Element class - describes a method etc...
12  * @name {String} name of method
13  * @purpose {String} short description of method.
14  * 
15  * @constructor
16  * Create a new E
17  * @param {Object} config The config object
18  */
19
20
21
22 Roo.doc.Entry  = function(config){
23     Roo.doc.Entry.superclass.constructor.call(this, config);
24     //this.el = Roo.get(document.body);
25     var body = Roo.get(document.body);
26     body.attr({
27         leftmargin : 0,
28         marginwidth : 0,
29         topmargin : 0,
30         marginheight : 0,
31         offset : 0
32     });
33     Roo.mailer.Body._calls++;
34     if (Roo.mailer.Body._calls > 1) {
35         throw "test";
36     }
37     // call onRender once... and block next call...?
38     this.onRender(body);
39     this.onRender = function() { };
40
41 };
42
43 Roo.doc.Entry._calls = 0;
44
45 Roo.extend(Roo.doc.Entry, Roo.bootstrap.Component,  {
46     
47     
48     name : '',
49     purpose : '',
50     
51     getAutoCreate : function(){
52         
53         var cfg ={
54             cls : 'refentry',
55             cn : [
56                 {
57                     tag: 'h1',
58                     cls: 'refname',
59                     html : this.name
60                 },
61                 {
62                     cls: 'refnamediv',
63                     html : this.purpose
64                 }
65             ]
66         };
67         
68         
69          
70         
71         return cfg;
72     },
73     
74     addxtype :   function (tree, cntr)
75     {
76         return this.addxtypeChild(tree,cntr);
77     }
78
79     
80     
81    
82 });
83
84  
85
86