examples/bootstrap/calendar.js
[roojs1] / examples / bootstrap / calendar.js
1
2
3 Roo.example = Roo.example || {};
4
5 Roo.example.calendar = new Roo.XComponent({
6     part     :  ["layout","viewpanel"],
7     order    : '001-viewpanel',
8     region   : '',
9     parent   : '#bootstrap',
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         
16         this.parent = {
17             el : new Roo.bootstrap.Body(),
18         }
19         this.parent.el.layout = false;
20         this.parent.el.render(document.body);
21         
22         var _this = this;
23         var MODULE = this;
24         return {
25             xtype: 'Body',
26             xns: Roo.bootstrap,
27             items : [
28                  {
29                     xtype: 'Container',
30                     xns: Roo.bootstrap,
31                     style :  'margin-top:50px', 
32                     items : [
33                         {
34                             xtype: 'Row',
35                             xns: Roo.bootstrap,
36                             style :  'margin-top:50px',
37                             items : [
38                                 { 
39                                     xtype: 'Calendar',
40                                     xns: Roo.bootstrap,
41                                     cls : 'col-md-6 col-sm-12',
42                                     listeners : {
43                                         render : function() {
44                                             _this.cal = this;
45                                         },
46                                         evententer : function(e,el,data) {
47                                             _this.popover.show(el)
48                                         },
49                                         eventleave : function(e,el,data) {
50                                             Roo.log('event leave');
51                                             _this.popover.hide();
52                                         },
53                                     }
54                                  }
55                             ]
56                         }
57                     ]
58                  },
59                   {
60                     xtype: 'Popover',
61                     xns: Roo.bootstrap,
62                     title : "test popover",
63                     html : "test content",
64                     trigger : false,
65                     listeners : {
66                         render : function(args) {
67                             _this.popover = this;
68                         }
69                     }
70                 }
71             ]
72         };
73     }
74 });