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