2013-02-27 27 views
0

我想知道是否有將FullCalendar事件定位爲向左浮動的好方法。在可用的水平空間填滿之後,它們將垂直堆疊。這看起來沒問題,因爲這些事件也會被限制爲10px×10px的大小。並排放置FullCalendar事件。將偶數大小限制爲10px x 10px

我知道我需要改變left:和top:css屬性。

而不是尋找這樣的:

======== - >事件
======== - >事件

它應該是這樣的:

[ - ] [ - ] - >事件
^ 事件

我在哪裏可以使FullCalendar.js的變化?

回答

0

在附近變種R,V = LA + .min版 「 - 控件頭」,EA = LA + 「​​ - 控件內容」您有:

R="<table class='fc-border-separate' style='width:100%' cellspacing='0'><thead><tr>";for(aa=0;aa<F;aa++)R+="<th class='fc- "+V+"'/>";R+="</tr></thead><tbody>";for(aa=0;aa<w;aa++){R+="<tr class='fc-week"+aa+"'>";for(V=0;V<F;V++)R+="<td class='fc- "+ea+" fc-day"+(aa*F+V)+"'><div>"+(I?"<div class='fc-day-number'/>":"")+"<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>";R+="</tr>"}R+="</tbody></table>"; 

你嘗試編輯此部分。

幾個月前爲我工作。

+0

對不起什麼也正是這樣完成的嗎? – 2013-02-27 17:49:03

+1

old_adam,你解決了這個問題嗎?我碰巧也需要並行渲染事件。 – 2013-04-03 18:58:13

+1

有沒有人能夠解決這個問題?我也有興趣並排舉辦活動,直到細胞達到寬度,然後再換新線等。 – Jonas 2013-04-18 23:52:28

0

您需要修改函數renderSlotSegs;驗證碼:

if (levelI) { 
    // indented and thin 
    outerWidth = availWidth/(levelI + forward + 1); 
}else{ 
    if (forward) { 
     // moderately wide, aligned left still 
     outerWidth = ((availWidth/(forward + 1)) - (12/2)) * 2; // 12 is the predicted width of resizer = 
    }else{ 
     // can be entire width, aligned left 
     outerWidth = availWidth; 
    } 
} 

應改爲:

if (levelI) { 
    // indented and thin 
    outerWidth = availWidth/(levelI + forward + 1); 
}else{ 
    if (forward) { 
     // changed to limit width of first overlapping slot 
     outerWidth = availWidth/(forward + 1); 
    }else{ 
     // can be entire width, aligned left 
     outerWidth = availWidth; 
    } 
}