From 644e5e264543cb7f49b55a6fe92dcbcb07adf55b Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 14 Nov 2011 23:48:27 +0100 Subject: [PATCH] Update patch against fullcalendar 1.5.2 --- plugins/calendar/lib/fullcalendar-rc.patch | 133 ++++++++++++++++++--- 1 file changed, 117 insertions(+), 16 deletions(-) diff --git a/plugins/calendar/lib/fullcalendar-rc.patch b/plugins/calendar/lib/fullcalendar-rc.patch index dbb2ff30..fd0ea6f6 100644 --- a/plugins/calendar/lib/fullcalendar-rc.patch +++ b/plugins/calendar/lib/fullcalendar-rc.patch @@ -1,5 +1,5 @@ --- js/fullcalendar-1.5.2.js 2011-08-21 22:07:18.000000000 +0200 -+++ js/fullcalendar.js 2011-10-18 23:01:09.000000000 +0200 ++++ js/fullcalendar.js 2011-11-14 23:44:05.000000000 +0100 @@ -29,6 +29,7 @@ right: 'today prev,next' }, @@ -84,17 +84,20 @@ currentView.renderEvents(events, modifiedEventID); currentView.eventsDirty = false; } -@@ -632,6 +659,9 @@ +@@ -632,6 +659,12 @@ if (name == 'height' || name == 'contentHeight' || name == 'aspectRatio') { options[name] = value; updateSize(); + } else if (name.indexOf('list') == 0 || name == 'tableCols') { + options[name] = value; + currentView.start = null; // force re-render ++ } ++ else if (name == 'maxHeight') { ++ options[name] = value; } } -@@ -897,15 +927,16 @@ +@@ -897,15 +930,16 @@ } @@ -115,7 +118,7 @@ } } -@@ -1092,8 +1123,9 @@ +@@ -1092,8 +1126,9 @@ stickySource.events.push(event); event.source = stickySource; } @@ -126,7 +129,7 @@ reportEvents(cache); } -@@ -1581,10 +1613,23 @@ +@@ -1581,10 +1616,23 @@ return 'th'; } return ['st', 'nd', 'rd'][date%10-1] || 'th'; @@ -151,7 +154,7 @@ fc.applyAll = applyAll; -@@ -3536,10 +3581,10 @@ +@@ -3536,10 +3584,10 @@ function slotSelectionMousedown(ev) { if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button unselect(ev); @@ -164,7 +167,7 @@ var d1 = cellDate(origCell); var d2 = cellDate(cell); dates = [ -@@ -3651,7 +3696,7 @@ +@@ -3651,7 +3699,7 @@ var calendar = t.calendar; var formatDate = calendar.formatDate; var formatDates = calendar.formatDates; @@ -173,7 +176,7 @@ /* Rendering -@@ -3675,6 +3720,12 @@ +@@ -3675,6 +3723,12 @@ setHeight(); // no params means set to viewHeight } renderSlotSegs(compileSlotSegs(slotEvents), modifiedEventId); @@ -186,7 +189,7 @@ } -@@ -3764,7 +3815,8 @@ +@@ -3764,7 +3818,8 @@ height, slotSegmentContainer = getSlotSegmentContainer(), rtl, dis, dit, @@ -196,7 +199,7 @@ if (rtl = opt('isRTL')) { dis = -1; -@@ -3791,8 +3843,11 @@ +@@ -3791,8 +3846,11 @@ outerWidth = availWidth / (levelI + forward + 1); }else{ if (forward) { @@ -210,7 +213,7 @@ }else{ // can be entire width, aligned left outerWidth = availWidth; -@@ -3803,7 +3858,7 @@ +@@ -3803,7 +3861,7 @@ * dis + (rtl ? availWidth - outerWidth : 0); // rtl seg.top = top; seg.left = left; @@ -219,7 +222,7 @@ seg.outerHeight = bottom - top; html += slotSegHtml(event, seg); } -@@ -3953,6 +4008,37 @@ +@@ -3953,6 +4011,37 @@ } @@ -257,7 +260,7 @@ /* Dragging -----------------------------------------------------------------------------------*/ -@@ -4262,7 +4348,7 @@ +@@ -4262,7 +4351,7 @@ function opt(name, viewNameOverride) { var v = options[name]; @@ -266,7 +269,90 @@ return smartProperty(v, viewNameOverride || viewName); } return v; -@@ -4806,6 +4892,8 @@ +@@ -4528,6 +4617,9 @@ + var seg; + var top; + var k; ++ var overflows; ++ var overflowLinks; ++ var maxHeight = opt('maxHeight'); + segmentContainer[0].innerHTML = daySegHTML(segs); // faster than .html() + daySegElementResolve(segs, segmentContainer.children()); + daySegElementReport(segs); +@@ -4539,26 +4631,69 @@ + // set row heights, calculate event tops (in relation to row top) + for (rowI=0; rowI maxHeight) { ++ seg.overflow = true; ++ } ++ else { ++ seg.top = top; ++ top += seg.outerHeight; ++ } + for (k=seg.startCol; k 1) { ++ element = $('').addClass('fc-more-link').html('+'+link.count).appendTo(container); ++ element[0].style.position = 'absolute'; ++ element[0].style.left = link.seg.left + 'px'; ++ element[0].style.top = (link.top + rowDiv[0].offsetTop) + 'px'; ++ triggerRes = trigger('overflowRender', link, { count:link.count, date:link.date }, element); ++ if (triggerRes === false) ++ element.remove(); ++ } ++ else { ++ link.seg.top = link.top; ++ link.seg.overflow = false; ++ } ++ } ++ } ++ } ++ ++ + function renderTempDaySegs(segs, adjustRow, adjustTop) { + var tempContainer = $("
"); + var elements; +@@ -4806,6 +4941,8 @@ } seg.outerHeight = element[0].offsetHeight + val; } @@ -275,11 +361,26 @@ } } -@@ -5206,5 +5294,561 @@ +@@ -4842,11 +4979,13 @@ + for (i=0; i