roojs-all.js
[roojs1] / examples / layout / calendar.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 calendarpanel = new Roo.XComponent({
6     part     :  ["layout","calendarpanel"],
7     order    : '001-calendarpanel',
8     region   : '',
9     parent   : '#view-panel',
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         var _this = this;
16         var MODULE = this;
17         return {
18             xtype: 'NestedLayoutPanel',
19             xns: Roo,
20             region : 'center',
21             layout : {
22                 xtype: 'BorderLayout',
23                 region : 'center',
24                 xns: Roo,
25                 items : [
26                     {
27                         xtype: 'CalendarPanel',
28                         xns: Roo,
29                         region : 'center',
30                         listeners : {
31                             activate : function (_self)
32                             {
33                                 Roo.log('activate');
34                             },
35                             render : function (_self)
36                             {
37                                 Roo.log('render');
38                             }
39                         },
40                           store : {
41                                 xtype: 'Store',
42                                 xns: Roo.data,
43                                 listeners : {
44                                     beforeload : function (_self, o){
45                                         o.params = o.params || {};
46                                         var d = new Date().format('Y-m-d');
47                                         if(_this.cal){
48                                             d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
49                                         }
50                                         o.params._activeDate = d
51                                     }
52                                 },
53                                 remoteSort : true,
54                                 sortInfo : { direction : 'ASC', field: 'start_dt' },
55                                 proxy : {
56                                     xtype: 'HttpProxy',
57                                     xns: Roo.data,
58                                     method : 'GET',
59                                     url : 'http://roojs.com/admin.php/Roo/mtrack_ticket?_dc=1396967515369&_future_schedule=1&query%5Bviewtype%5D=active&limit=999&sort=summary&dir=ASC'
60                                 },
61                                 reader : {
62                                     xtype: 'JsonReader',
63                                     xns: Roo.data,
64                                     id : 'id',
65                                     root : 'data',
66                                     totalProperty : 'total',
67                                     fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
68                                 }
69                             }
70                     }
71                          
72                 ],
73                 center : {
74                     xtype: 'LayoutRegion',
75                     xns: Roo
76                 }
77             },
78             listeners : {
79                 'activate' : function() {
80                     _this.nest = this;
81                     Roo.log('nested activate');
82                     this.layout.getRegion('center').showPanel(0);;
83                 }
84             }
85         };
86     }
87 });