clean aspectRatio option, setting height right after init bugfix, ie6 button positioning bugfix, nixed cache option
This commit is contained in:
parent
6a5be40d41
commit
b61b9d5682
9 changed files with 149 additions and 7 deletions
|
@ -68,7 +68,7 @@ function Agenda(element, options, methods) {
|
||||||
var head, body, bodyContent, bodyTable, bg,
|
var head, body, bodyContent, bodyTable, bg,
|
||||||
colCnt,
|
colCnt,
|
||||||
axisWidth, colWidth, slotHeight,
|
axisWidth, colWidth, slotHeight,
|
||||||
cachedDaySegs, cachedSlotSegs,
|
cachedDaySegs=[], cachedSlotSegs=[],
|
||||||
cachedHeight,
|
cachedHeight,
|
||||||
tm, firstDay,
|
tm, firstDay,
|
||||||
nwe, // no weekends (int)
|
nwe, // no weekends (int)
|
||||||
|
|
|
@ -101,7 +101,6 @@ table.fc-header {
|
||||||
|
|
||||||
.fc-header .fc-state-default a {
|
.fc-header .fc-state-default a {
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
|
||||||
border-width: 0 1px;
|
border-width: 0 1px;
|
||||||
margin: 0 -1px;
|
margin: 0 -1px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -115,7 +115,7 @@ function Grid(element, options, methods) {
|
||||||
rowCnt, colCnt,
|
rowCnt, colCnt,
|
||||||
colWidth,
|
colWidth,
|
||||||
thead, tbody,
|
thead, tbody,
|
||||||
cachedSegs, //...
|
cachedSegs=[], //...
|
||||||
|
|
||||||
// initialize superclass
|
// initialize superclass
|
||||||
view = $.extend(this, viewMethods, methods, {
|
view = $.extend(this, viewMethods, methods, {
|
||||||
|
|
|
@ -28,7 +28,6 @@ var defaults = {
|
||||||
// event ajax
|
// event ajax
|
||||||
startParam: 'start',
|
startParam: 'start',
|
||||||
endParam: 'end',
|
endParam: 'end',
|
||||||
cache: false,
|
|
||||||
|
|
||||||
// time formats
|
// time formats
|
||||||
titleFormat: {
|
titleFormat: {
|
||||||
|
@ -304,7 +303,7 @@ $.fn.fullCalendar = function(options) {
|
||||||
else if (options.height) {
|
else if (options.height) {
|
||||||
return options.height - (header ? header.height() : 0) - horizontalSides(content);
|
return options.height - (header ? header.height() : 0) - horizontalSides(content);
|
||||||
}
|
}
|
||||||
return elementWidth / options.aspectRatio;
|
return elementWidth / Math.max(options.aspectRatio, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -366,7 +365,7 @@ $.fn.fullCalendar = function(options) {
|
||||||
url: src,
|
url: src,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: params,
|
data: params,
|
||||||
cache: options.cache,
|
cache: false,
|
||||||
success: reportEventsAndPop
|
success: reportEventsAndPop
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -830,4 +829,5 @@ function normalizeEvent(event, options) {
|
||||||
event.className = [];
|
event.className = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO: if there is no title or start date, return false to indicate an invalid event
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@ var parseDate = fc.parseDate = function(s) {
|
||||||
}
|
}
|
||||||
return parseISO8601(s, true) || (s ? new Date(s) : null);
|
return parseISO8601(s, true) || (s ? new Date(s) : null);
|
||||||
}
|
}
|
||||||
|
// TODO: never return invalid dates (like from new Date(<string>)), return null instead
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
51
tests/issue_220_buttons_ie6.html
Normal file
51
tests/issue_220_buttons_ie6.html
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script type='text/javascript'>DISABLE_FIREBUG_LITE=true</script>
|
||||||
|
<script type='text/javascript' src='loader.js'></script>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar({
|
||||||
|
header: {
|
||||||
|
left: 'prev,next today',
|
||||||
|
center: 'title',
|
||||||
|
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style type='text/css'>
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style='height:108px;position:relative'></div>
|
||||||
|
<div style='position:relative;margin-top:-50px;width:900px;z-index:2'>
|
||||||
|
<div style='position:relative;padding:3px'>
|
||||||
|
|
||||||
|
<div style='margin: 10px 20px 0'>Nav</div>
|
||||||
|
|
||||||
|
<div style='margin:20px 0 0;padding:0 20px'>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
this is a paragraph
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div id='calendar' style='margin:3em 0;direction:ltr'></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
45
tests/issue_230_height_json_events.html
Normal file
45
tests/issue_230_height_json_events.html
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel='stylesheet' type='text/css' href='../examples/redmond/theme.css' />
|
||||||
|
<script type='text/javascript' src='loader.js'></script>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar({
|
||||||
|
year: 2009,
|
||||||
|
month: 10,
|
||||||
|
date: 22,
|
||||||
|
//defaultView: 'agendaWeek', // error also occured with month view
|
||||||
|
editable: true,
|
||||||
|
events: "../examples/json-events.php"
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar('option', 'height', $(window).height()-80);
|
||||||
|
// shouldn't throw an error
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style type='text/css'>
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin-top: 40px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calendar {
|
||||||
|
width: 900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='calendar'></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
44
tests/issue_244_aspectRatio_0.html
Normal file
44
tests/issue_244_aspectRatio_0.html
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel='stylesheet' type='text/css' href='../examples/redmond/theme.css' />
|
||||||
|
<script type='text/javascript' src='loader.js'></script>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#calendar').fullCalendar({
|
||||||
|
header: {
|
||||||
|
left: 'prev,next today',
|
||||||
|
center: 'title',
|
||||||
|
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay',
|
||||||
|
},
|
||||||
|
defaultView: 'agendaWeek', // month view also looked scrunched
|
||||||
|
aspectRatio: 0
|
||||||
|
});
|
||||||
|
|
||||||
|
// shouldnt allow aspectRatios to *actually* go under .5
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style type='text/css'>
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin-top: 40px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calendar {
|
||||||
|
width: 900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='calendar'></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -85,7 +85,9 @@ if (_build) {
|
||||||
includeJS('../src/gcal.js');
|
includeJS('../src/gcal.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
includeJS('firebug-lite/firebug-lite-compressed.js');
|
if (!window.DISABLE_FIREBUG_LITE) {
|
||||||
|
includeJS('firebug-lite/firebug-lite-compressed.js');
|
||||||
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
$('body').append(
|
$('body').append(
|
||||||
|
|
Loading…
Add table
Reference in a new issue