Roo/doc/NavCategory.js
[roojs1] / Roo / doc / NavCategory.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.NavCategory
8  * @extends Roo.bootstrap.Component
9  * Navigation Category class
10  * @cfg {string} title
11  * @cfg {string} name
12  *
13  * Represent's an category on the left menu.
14  * - phpdoc @category elements map the pages to the categories
15  *   this should be on the left side of the menu, when the
16  *   contents are loaded, then it can expand this out, and add links
17  *   for each of the methods.
18  *
19  * 
20  * 
21  * @constructor
22  * Create a new Navigation Category
23  * @param {Object} config The config object
24  */
25
26 Roo.doc.NavCategory = function(config){
27     Roo.doc.Para.superclass.constructor.call(this, config);
28 };
29
30 Roo.extend(Roo.doc.NavCategory, Roo.bootstrap.Component,  {
31     
32     title : '',
33     name : '',
34     getAutoCreate : function(){
35         
36         //?? this is the synopsis type....
37         
38         // this is not very fancy...
39         
40         var cfg ={
41             
42             cn : [
43                 
44                 {
45                     tag : 'a',
46                     cls: 'roo-nav-category',
47                     href : '#' + this.name,
48                     html : this.title
49                 },
50                 {
51                     cls : 'container roo-child-ctr'
52                 }
53             ]
54         };
55
56         return cfg;
57     },
58     getChildContainer : function()
59     {
60         return this.el.select('.roo-child-ctr',true).first();
61     }
62     
63     
64    
65 });
66
67  
68
69