PDA

View Full Version : Calendar MonthView 'more' window resize



navahao
11 Feb 2011, 1:03 AM
Hi all

I have problem with a MonthView "more" window resizer.

I have 400 calendar meeteng memo one day for all user and when i click in more link window is very height .

Modifed the MonthView.js file and not resize window:

onMoreClick : function(dt){
if(!this.detailPanel){

this.detailPanel = new Ext.Panel({
id: this.id+'-details-panel',
title: dt.format('F j'),
//layout: 'fit',
height: 200,
width: 200,
collapsible:true,
autoScroll: true,
floating: true,
renderTo: Ext.getBody(),
tools: [{
id: 'close',
handler: function(e, t, p){
p.hide();
}
}],
items: {
xtype: 'monthdaydetailview',
id: this.id+'-details-view',
date: dt,
view: this,
store: this.store,
listeners: {
'eventsrendered': this.onDetailViewUpdated.createDelegate(this)
}
}
});
}
else{
this.detailPanel.setTitle(dt.format('F j'));
}
this.detailPanel.getComponent(this.id+'-details-view').update(dt);
},
pls help me.

Thanks


Navahao

navahao
11 Feb 2011, 6:35 AM
Hi all

Resolved this :


// private
onMoreClick : function(dt){
if(!this.detailPanel){

this.detailPanel = new Ext.Panel({
id: this.id+'-details-panel',
title: dt.format('F j'),
layout: 'fit',
collapsible:true,
autoScroll: true,
floating: true,
renderTo: Ext.getBody(),
tools: [{
id: 'close',
handler: function(e, t, p){
p.hide();
}
}],
items: {
xtype: 'monthdaydetailview',
id: this.id+'-details-view',
date: dt,
view: this,
store: this.store,
listeners: {
'eventsrendered': this.onDetailViewUpdated.createDelegate(this)
}
}
});
}
else{
this.detailPanel.setTitle(dt.format('F j'));
}
moreWindowSize = 250;
this.detailPanel.getComponent(this.id+'-details-view').update(dt);

},

// private
onDetailViewUpdated : function(view, dt, numEvents){
var p = this.detailPanel,
frameH = p.getFrameHeight(),
evtH = this.getEventHeight(),
bodyH = frameH + (numEvents * evtH) + 3,
dayEl = this.getDayEl(dt),
box = dayEl.getBox();

p.updateBox(box);
if (moreWindowSize > 0) {p.setHeight(moreWindowSize);} else {p.setHeight(bodyH);}
p.setWidth(Math.max(box.width, 220));
p.show();
p.getPositionEl().alignTo(dayEl, 't-t?');
},


Regards

Navahao