Permalink
Browse files

Upgrade FullCalendar to latest stable (1.5.3)

  • Loading branch information...
martin-g committed May 22, 2012
1 parent f166117 commit 071f9f82c92e5ee415cfdf5fe5d18265cb5f1b42
@@ -1,11 +1,11 @@
/*
- * FullCalendar v1.5 Stylesheet
+ * FullCalendar v1.5.3 Stylesheet
*
* Copyright (c) 2011 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
- * Date: Sat Mar 19 18:59:37 2011 -0700
+ * Date: Mon Feb 6 22:40:40 2012 -0800
*
*/
@@ -245,6 +245,10 @@ html .fc,
border-color: #ddd;
}
+.fc-state-disabled {
+ cursor: default;
+ }
+
.fc-state-disabled .fc-button-effect {
display: none;
}
@@ -286,6 +290,7 @@ a.fc-event {
height: 100%;
border-style: solid;
border-width: 0;
+ overflow: hidden;
}
.fc-event-time,
@@ -1,6 +1,6 @@
/**
* @preserve
- * FullCalendar v1.5
+ * FullCalendar v1.5.3
* http://arshaw.com/fullcalendar/
*
* Use fullcalendar.css for basic styling.
@@ -11,7 +11,7 @@
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
- * Date: Sat Mar 19 18:59:37 2011 -0700
+ * Date: Mon Feb 6 22:40:40 2012 -0800
*
*/
@@ -111,7 +111,7 @@ var rtlDefaults = {
-var fc = $.fullCalendar = { version: "1.5" };
+var fc = $.fullCalendar = { version: "1.5.3" };
var fcViews = fc.views = {};
@@ -743,8 +743,8 @@ function Header(calendar, options) {
};
}
if (buttonClick) {
- var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null;
- var text = smartProperty(options.buttonText, buttonName);
+ var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here?
+ var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here?
var button = $(
"<span class='fc-button fc-button-" + buttonName + " " + tm + "-state-default'>" +
"<span class='fc-button-inner'>" +
@@ -1374,8 +1374,8 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
return new Date(s * 1000);
}
if (typeof s == 'string') {
- if (s.match(/^\d+$/)) { // a UNIX timestamp
- return new Date(parseInt(s, 10) * 1000);
+ if (s.match(/^\d+(\.\d+)?$/)) { // a UNIX timestamp
+ return new Date(parseFloat(s) * 1000);
}
if (ignoreTimezone === undefined) {
ignoreTimezone = true;
@@ -1390,12 +1390,12 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
// derived from http://delete.me.uk/2005/03/iso8601.html
// TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
- var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/);
+ var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);
if (!m) {
return null;
}
var date = new Date(m[1], 0, 1);
- if (ignoreTimezone || !m[14]) {
+ if (ignoreTimezone || !m[13]) {
var check = new Date(m[1], 0, 1, 9, 0);
if (m[3]) {
date.setMonth(m[3] - 1);
@@ -1431,9 +1431,11 @@ function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
m[10] || 0,
m[12] ? Number("0." + m[12]) * 1000 : 0
);
- var offset = Number(m[16]) * 60 + Number(m[17]);
- offset *= m[15] == '-' ? 1 : -1;
- date = new Date(+date + (offset * 60 * 1000));
+ if (m[14]) {
+ var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0);
+ offset *= m[15] == '-' ? 1 : -1;
+ date = new Date(+date + (offset * 60 * 1000));
+ }
}
return date;
}
@@ -5155,6 +5157,7 @@ function HoverListener(coordinateGrid) {
function mouse(ev) {
+ _fixUIEvent(ev); // see below
var newCell = coordinateGrid.cell(ev.pageX, ev.pageY);
if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) {
if (newCell) {
@@ -5178,6 +5181,19 @@ function HoverListener(coordinateGrid) {
}
+
+
+// this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1)
+// upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem
+// but keep this in here for 1.8.16 users
+// and maybe remove it down the line
+
+function _fixUIEvent(event) { // for issue 1168
+ if (event.pageX === undefined) {
+ event.pageX = event.originalEvent.pageX;
+ event.pageY = event.originalEvent.pageY;
+ }
+}
function HorizontalPositionCache(getElement) {
var t = this,
@@ -5205,4 +5221,4 @@ function HorizontalPositionCache(getElement) {
}
-})(jQuery);
+})(jQuery);
Oops, something went wrong.

0 comments on commit 071f9f8

Please sign in to comment.