examples/layout/calendar.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                 height : 900,
25                 xns: Roo,
26                 items : [
27                     {
28                         xtype: 'CalendarPanel',
29                         xns: Roo,
30                         region : 'center',
31                         listeners : {
32                             activate : function (_self)
33                             {
34                                 Roo.log('calendar.js activate');
35                             },
36                             render : function (_self)
37                             {
38                                 Roo.log('calendar.js render');
39                             }
40                         },
41                           store : {
42                                 xtype: 'Store',
43                                 xns: Roo.data,
44                                 listeners : {
45                                     beforeload : function (_self, o){
46                                         o.params = o.params || {};
47                                         var d = new Date().format('Y-m-d');
48                                         if(_this.cal){
49                                             d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
50                                         }
51                                         o.params._activeDate = d
52                                     }
53                                 },
54                                 remoteSort : true,
55                                 sortInfo : { direction : 'ASC', field: 'start_dt' },
56                                 proxy : {
57                                     xtype: 'HttpProxy',
58                                     xns: Roo.data,
59                                     method : 'GET',
60                                     url : 'http://roojs.com/admin.php/Roo/mtrack_ticket?_dc=1396967515369&_future_schedule=1&query%5Bviewtype%5D=active&limit=999&sort=summary&dir=ASC'
61                                 },
62                                 reader : {
63                                     xtype: 'JsonReader',
64                                     xns: Roo.data,
65                                     id : 'id',
66                                     root : 'data',
67                                     totalProperty : 'total',
68                                     fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
69                                 }
70                             }
71                     }
72                          
73                 ],
74                 center : {
75                     xtype: 'LayoutRegion',
76                     xns: Roo,
77                     height : 900
78                 }
79             },
80             listeners : {
81                 'activate' : function() {
82                     _this.nest = this;
83                     Roo.log('nested activate');
84                     this.layout.getRegion('center').showPanel(0);;
85                 }
86             }
87         };
88     }
89 });