final tweaks for 1.4

This commit is contained in:
Adam Shaw
2009-11-22 16:21:13 -08:00
parent 067481b774
commit d1bc5dc529
13 changed files with 64 additions and 30 deletions
+15 -4
View File
@@ -52,7 +52,7 @@ function Agenda(element, options, methods) {
var head, body, bodyContent, bodyTable, bg,
colCnt,
axisWidth, colWidth, slotHeight, // todo: axisWidth -> axisWidth, slotHeight->slotHeight ?
axisWidth, colWidth, slotHeight,
cachedDaySegs, cachedSlotSegs,
tm, firstDay,
rtl, dis, dit, // day index sign / translate
@@ -229,7 +229,15 @@ function Agenda(element, options, methods) {
var d0 = new Date(1970, 0, 1),
scrollDate = cloneDate(d0);
scrollDate.setHours(options.firstHour);
body.scrollTop(timePosition(d0, scrollDate) + 1); // +1 for the border
var go = function() {
body.scrollTop(timePosition(d0, scrollDate) + 1); // +1 for the border
// TODO: +1 doesn't apply when firstHour=0
}
if ($.browser.opera) {
setTimeout(go, 0); // opera 10 (and earlier?) needs this
}else{
go();
}
}
@@ -254,8 +262,7 @@ function Agenda(element, options, methods) {
.width('')
.each(function() {
axisWidth = Math.max(axisWidth, $(this).outerWidth());
})
.add(stripeTDs.eq(0)),
}),
axisWidth
);
@@ -273,6 +280,10 @@ function Agenda(element, options, methods) {
});
slotHeight = body.find('tr:first div').height() + 1;
// TODO:
//reportTBody(bodyTable.find('tbody'));
// Opera 9.25 doesn't detect the bug when called from agenda
}
function slotClick(ev) {
+4 -1
View File
@@ -252,12 +252,15 @@ table.fc-header {
* color: red;
* }
*/
.fc-event {
text-align: left;
}
.fc-event a {
overflow: hidden;
font-size: .85em;
text-decoration: none;
text-align: left;
cursor: pointer;
}
+1 -1
View File
@@ -239,7 +239,7 @@ function Grid(element, options, methods) {
}
updateSize(); // BUG: quirky widths with weekMode:variable
updateSize();
fetchEvents(renderEvents);
};
+7 -2
View File
@@ -83,6 +83,10 @@ var rtlDefaults = {
next: ' ◄ ',
prevYear: ' >> ',
nextYear: ' << '
},
buttonIcons: {
prev: 'circle-triangle-e',
next: 'circle-triangle-w'
}
};
@@ -560,8 +564,7 @@ $.fn.fullCalendar = function(options) {
tr.append("<td><span class='fc-header-space'/></td>");
}
var prevButton;
$.each(this.split(','), function(j) {
var buttonName = this; // TODO: make this an arg one line above
$.each(this.split(','), function(j, buttonName) {
if (buttonName == 'title') {
tr.append("<td><h2 class='fc-header-title'/></td>");
if (prevButton) {
@@ -658,6 +661,8 @@ $.fn.fullCalendar = function(options) {
overflow: 'hidden',
height: Math.round(content.width() / options.aspectRatio)
});
// TODO: previous action might have caused scrollbars
// which will make the window width more narrow, possibly changing the aspect ratio
}
}
-2
View File
@@ -11,8 +11,6 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Date:
* Revision:
*/
(function($) {
+1 -1
View File
@@ -276,7 +276,7 @@ function setOuterHeight(element, height, includeMargins) {
var operaPositionBug;
function reportTBody(tbody) { // TODO: have agenda use this too
function reportTBody(tbody) {
if (operaPositionBug == undefined) {
operaPositionBug = tbody.position().top != tbody.find('tr').position().top;
}