this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue
{tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true);
-
+
//this.wrapper.dom.appendChild(grid.getGridEl().dom);
Roo.CalendarPanel.superclass.constructor.call(this, this.wrapper, config);
//this.footer = Roo.factory(this.footer, Roo);
}
-// this.view = new Roo.calendar.View(Roo.apply({
-// skipNavHeader : true,
-// skipMonthHeader : true
-//
-// },config));
-//
+ this.view = new Roo.calendar.View(Roo.apply({
+ skipNavHeader : true,
+ skipMonthHeader : false
+
+ },config));
+
this.on('activate', function()
{
- Roo.log('CalendarPanel.js activate');
+ Roo.log('activate');
//console.log('render tree');
this.render();
});
-// this.relayEvents(this.view, ["select","monthchange","evententer","eventleave","rendered"]);
+ this.relayEvents(this.view, ["select","monthchange","evententer","eventleave","rendered"]);
//this.grid = grid;
//this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel");
}
this.rendered = true;
- Roo.log("CalendarPanel.js render calendar");
+ Roo.log("render calendar");
//Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
-//
-// var cfg = Roo.apply({}, this.view.getAutoCreate());
-// cfg.id = Roo.id();
-//
-// // fill in the extra attributes
-// if (this.xattr && typeof(this.xattr) =='object') {
-// for (var i in this.xattr) {
-// cfg[i] = this.xattr[i];
-// }
-// }
-//
-// if(this.dataId){
-// cfg.dataId = this.dataId;
-// }
-//
-// if (this.cls) {
-// cfg.cls = (typeof(cfg.cls) == 'undefined') ? this.cls : cfg.cls + ' ' + this.cls;
-// }
-//
-// if (this.style) { // fixme needs to support more complex style data.
-// cfg.style = this.style;
-// }
-//
-// if(this.name){
-// cfg.name = this.name;
-// }
-//
-//// this.view.el = ct.createChild(cfg, position);
-// Roo.log('this.view');
-// Roo.log(this.view);
-// //if(this.tabIndex !== undefined){
-// // this.el.dom.setAttribute('tabIndex', this.tabIndex);
-// //}
-//
-//
-// this.view.initEvents();
+
+ var cfg = Roo.apply({}, this.view.getAutoCreate());
+ cfg.id = Roo.id();
+
+ // fill in the extra attributes
+ if (this.xattr && typeof(this.xattr) =='object') {
+ for (var i in this.xattr) {
+ cfg[i] = this.xattr[i];
+ }
+ }
+
+ if(this.dataId){
+ cfg.dataId = this.dataId;
+ }
+
+ if (this.cls) {
+ cfg.cls = (typeof(cfg.cls) == 'undefined') ? this.cls : cfg.cls + ' ' + this.cls;
+ }
+
+ if (this.style) { // fixme needs to support more complex style data.
+ cfg.style = this.style;
+ }
+
+ if(this.name){
+ cfg.name = this.name;
+ }
+
+ this.view.el = ct.createChild(cfg, position);
+
+ //if(this.tabIndex !== undefined){
+ // this.el.dom.setAttribute('tabIndex', this.tabIndex);
+ //}
+
+
+ this.view.initEvents();
this.fireEvent('rendered');
}