final tweaks for 1.4
This commit is contained in:
parent
067481b774
commit
d1bc5dc529
13 changed files with 64 additions and 30 deletions
4
Makefile
4
Makefile
|
@ -6,12 +6,14 @@ REV = `svn info | grep Rev: | sed 's/.*: //g'`
|
|||
JS_SRC_FILES =\
|
||||
main.js\
|
||||
grid.js\
|
||||
agenda.js\
|
||||
view.js\
|
||||
util.js
|
||||
|
||||
CSS_SRC_FILES =\
|
||||
main.css\
|
||||
grid.css
|
||||
grid.css\
|
||||
agenda.css
|
||||
|
||||
OTHER_FILES =\
|
||||
src/gcal.js\
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
version 1.4 (10/19/09)
|
||||
- agendaWeek and agendaDay views !!!
|
||||
- agendaWeek and agendaDay views
|
||||
- added some options for agenda views:
|
||||
- allDaySlot
|
||||
- allDayText
|
||||
|
@ -16,6 +16,7 @@ version 1.4 (10/19/09)
|
|||
- added 'prevYear' and 'nextYear' for buttons in header
|
||||
- minor change for theme users, ui-state-hover not applied to active/inactive buttons
|
||||
- added event-color-changing example in docs
|
||||
- better defaults for right-to-left themed button icons
|
||||
|
||||
version 1.3.2 (10/13/09)
|
||||
- Bugfixes (please upgrade from 1.3.1!)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ function Grid(element, options, methods) {
|
|||
|
||||
}
|
||||
|
||||
updateSize(); // BUG: quirky widths with weekMode:variable
|
||||
updateSize();
|
||||
fetchEvents(renderEvents);
|
||||
|
||||
};
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Date:
|
||||
* Revision:
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -31,13 +31,15 @@
|
|||
|
||||
weekMode: 'variable',
|
||||
|
||||
dayClick: function(dayDate, view) {
|
||||
console.log('dayClick - ' + dayDate + ' - ' + view.title);
|
||||
dayClick: function(dayDate, allDay, ev, view) {
|
||||
console.log('dayClick - ' + dayDate + ' - allDay:' + allDay + ' --- ' + view.title);
|
||||
},
|
||||
|
||||
eventDrop: function(event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, view) {
|
||||
eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {
|
||||
console.log('DROP ' + event.title);
|
||||
console.log(dayDelta + ' days');
|
||||
console.log(minuteDelta + ' minutes');
|
||||
console.log('allDay: ' + allDay);
|
||||
console.log(event.start);
|
||||
//console.log(minuteDelta + ' minutes');
|
||||
},
|
||||
|
@ -45,6 +47,7 @@
|
|||
eventResize: function(event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, view) {
|
||||
console.log('RESIZE!! ' + event.title);
|
||||
console.log(dayDelta + ' days');
|
||||
console.log(minuteDelta + ' minutes');
|
||||
console.log(event.end);
|
||||
//console.log(minuteDelta + ' minutes');
|
||||
},
|
||||
|
|
|
@ -78,8 +78,10 @@
|
|||
|
||||
function updateEventStart() {
|
||||
var event = cal.fullCalendar('clientEvents', 777)[0];
|
||||
event.start = new Date(y, m, 25, 10, 30);
|
||||
event.end = new Date(y, m, 26);
|
||||
event.start = new Date(y, m, d, 13, 30);
|
||||
event.end = new Date(y, m, d, 14, 50);
|
||||
//event.start = new Date(y, m, 25, 10, 30); // move big days
|
||||
//event.end = new Date(y, m, 26);
|
||||
//event.allDay = true;
|
||||
cal.fullCalendar('updateEvent', event);
|
||||
}
|
||||
|
@ -88,7 +90,7 @@
|
|||
var event = cal.fullCalendar('clientEvents', 999)[0];
|
||||
event.start = new Date(y, m, 4, 13, 30);
|
||||
event.end = new Date(y, m, 5, 2, 0);
|
||||
event.allDay = false;
|
||||
event.allDay = true;
|
||||
event.title = "repeat yo";
|
||||
//event.editable = false;
|
||||
event.url = "http://google.com/";
|
||||
|
|
|
@ -12,15 +12,14 @@
|
|||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
|
||||
/*
|
||||
year: 2010,
|
||||
month: 0,
|
||||
date: 0,
|
||||
//year: 2010,
|
||||
//month: 0,
|
||||
//date: 1,
|
||||
|
||||
defaultView: 'basicDay',
|
||||
//defaultView: 'basicDay',
|
||||
|
||||
//aspectRatio: 1,
|
||||
|
||||
aspectRatio: 1,
|
||||
*/
|
||||
|
||||
header: {
|
||||
left: 'title',
|
||||
|
|
|
@ -16,19 +16,28 @@
|
|||
theme: true,
|
||||
editable: true,
|
||||
|
||||
//isRTL: true,
|
||||
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
left: 'prevYear,prev,next,nextYear today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||
},
|
||||
|
||||
/*
|
||||
buttonIcons: {
|
||||
prev: 'triangle-1-w',
|
||||
next: 'triangle-1-e',
|
||||
today: 'home'
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
isRTL: true,
|
||||
header: {
|
||||
left: 'nextYear,next,prev,prevYear today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||
},
|
||||
*/
|
||||
|
||||
events: [
|
||||
{
|
||||
|
|
|
@ -141,7 +141,8 @@
|
|||
{
|
||||
id: 888,
|
||||
title: 'Meeting',
|
||||
start: new Date(y, m, d, 10, 30)
|
||||
start: new Date(y, m, d, 10, 30),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
id: 777,
|
||||
|
|
Loading…
Reference in a new issue