at version 1.2
This commit is contained in:
parent
2715c1ae74
commit
589d7ff181
3
Makefile
3
Makefile
|
@ -20,13 +20,14 @@ zip:
|
||||||
then cp build/fullcalendar.min.js build/fullcalendar-${VER}/fullcalendar;\
|
then cp build/fullcalendar.min.js build/fullcalendar-${VER}/fullcalendar;\
|
||||||
else echo "\n!!! WARNING: fullcalendar.js not yet minified.\n";\
|
else echo "\n!!! WARNING: fullcalendar.js not yet minified.\n";\
|
||||||
fi
|
fi
|
||||||
@rm -rf `find build -type d -name .svn`
|
@rm -rf `find build/fullcalendar-* -type d -name .svn`
|
||||||
@for f in build/fullcalendar-${VER}/fullcalendar/*.js; do\
|
@for f in build/fullcalendar-${VER}/fullcalendar/*.js; do\
|
||||||
sed -i "s/* FullCalendar/& v${VER}/" $$f;\
|
sed -i "s/* FullCalendar/& v${VER}/" $$f;\
|
||||||
sed -i "s/* Date:/& ${DATE}/" $$f;\
|
sed -i "s/* Date:/& ${DATE}/" $$f;\
|
||||||
sed -i "s/* Revision:/& ${REV}/" $$f;\
|
sed -i "s/* Revision:/& ${REV}/" $$f;\
|
||||||
done
|
done
|
||||||
@cd build; zip -r fullcalendar-${VVER}.zip fullcalendar-${VVER}
|
@cd build; zip -r fullcalendar-${VVER}.zip fullcalendar-${VVER}
|
||||||
|
@mkdir -p dist
|
||||||
@mv build/fullcalendar-${VER}.zip dist
|
@mv build/fullcalendar-${VER}.zip dist
|
||||||
@rm -rf build/fullcalendar-${VER}
|
@rm -rf build/fullcalendar-${VER}
|
||||||
@rm -f build/fullcalendar.min.js
|
@rm -f build/fullcalendar.min.js
|
||||||
|
|
|
@ -8,6 +8,7 @@ version 1.2 (5/31/09)
|
||||||
- better date formatting ($.fullCalendar.formatDate)
|
- better date formatting ($.fullCalendar.formatDate)
|
||||||
- multiple 'event sources' allowed
|
- multiple 'event sources' allowed
|
||||||
- dynamically add/remove event sources
|
- dynamically add/remove event sources
|
||||||
|
- options for prevYear and nextYear buttons
|
||||||
- docs have been reworked (include addition of Google Calendar docs)
|
- docs have been reworked (include addition of Google Calendar docs)
|
||||||
- changed behavior of parseDate for number strings
|
- changed behavior of parseDate for number strings
|
||||||
(now interpets as unix timestamp, not MS times)
|
(now interpets as unix timestamp, not MS times)
|
||||||
|
@ -17,9 +18,13 @@ version 1.2 (5/31/09)
|
||||||
- events from previous months sticking when clicking prev/next quickly
|
- events from previous months sticking when clicking prev/next quickly
|
||||||
- Google Calendar API changed to work w/ multiple event sources
|
- Google Calendar API changed to work w/ multiple event sources
|
||||||
- can also provide 'className' and 'draggable' options
|
- can also provide 'className' and 'draggable' options
|
||||||
- date utilties moved from $ properties to $.fullCalendar
|
- date utilties moved from $ to $.fullCalendar
|
||||||
|
- more documentation in source code
|
||||||
- minified version of fullcalendar.js
|
- minified version of fullcalendar.js
|
||||||
- test suit (available from svn)
|
- test suit (available from svn)
|
||||||
|
- top buttons now use <button> w/ an inner <span> for better css cusomization
|
||||||
|
- thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS,
|
||||||
|
UPGRADE YOUR FULLCALENDAR.CSS FILE!!!
|
||||||
|
|
||||||
version 1.1 (5/10/09)
|
version 1.1 (5/10/09)
|
||||||
- Added the following options:
|
- Added the following options:
|
||||||
|
|
|
@ -45,11 +45,25 @@ General Options
|
||||||
list of commands.
|
list of commands.
|
||||||
|
|
||||||
**buttons**: boolean/hash, default:``true``
|
**buttons**: boolean/hash, default:``true``
|
||||||
Determines whether navigation buttons will be displayed at the top of the
|
``true`` will display a previous-month, next-month, and "today" button.
|
||||||
calendar. A hash such as ``{today:false, prev:true, next:true}`` can be
|
The "today" button will only be visible for months other than the current.
|
||||||
provided to display only certain buttons. A hash such as
|
|
||||||
``{today:false, prev:"Last Month", next:"Next Month"}`` can be provided
|
``false`` will display absolutely no buttons.
|
||||||
to display only certain buttons AND change a button's text.
|
|
||||||
|
An object hash can be provided to display only *certain* buttons. The hash
|
||||||
|
can have the following properties::
|
||||||
|
|
||||||
|
{
|
||||||
|
today: bool/string,
|
||||||
|
prevYear: bool/string,
|
||||||
|
prevMonth: bool/string,
|
||||||
|
nextMonth: bool/string,
|
||||||
|
nextYear: bool/string
|
||||||
|
}
|
||||||
|
|
||||||
|
A value of ``false`` will not display the button. A value of ``true`` will
|
||||||
|
display the button with some default text. A *string* value will display
|
||||||
|
the button *and* customize its text.
|
||||||
|
|
||||||
**showTime**: boolean/ ``"guess"``, default:``"guess"``
|
**showTime**: boolean/ ``"guess"``, default:``"guess"``
|
||||||
Determines if times will be displayed before each event's title.
|
Determines if times will be displayed before each event's title.
|
||||||
|
@ -308,9 +322,15 @@ initialized:
|
||||||
**.fullCalendar(** ``'gotoMonth'``, **year, month)**
|
**.fullCalendar(** ``'gotoMonth'``, **year, month)**
|
||||||
Visits an arbitrary month. ``month`` is zero-based (0 is January, 1 is
|
Visits an arbitrary month. ``month`` is zero-based (0 is January, 1 is
|
||||||
February, etc).
|
February, etc).
|
||||||
|
|
||||||
**.fullCalendar(** ``'today'`` **)**
|
**.fullCalendar(** ``'today'`` **)**
|
||||||
Visits the current month.
|
Visits the current month.
|
||||||
|
|
||||||
|
**.fullCalendar(** ``'prevYear'`` **)**
|
||||||
|
Moves one year back.
|
||||||
|
|
||||||
|
**.fullCalendar(** ``'nextYear'`` **)**
|
||||||
|
Moves one year ahead.
|
||||||
|
|
||||||
**.fullCalendar(** ``'refresh'`` **)**
|
**.fullCalendar(** ``'refresh'`` **)**
|
||||||
Refetch and redraw the events for the current month.
|
Refetch and redraw the events for the current month.
|
||||||
|
|
|
@ -10,17 +10,24 @@
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-calendar-buttons input {
|
.full-calendar-buttons button {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin: 0 0 0 5px;
|
margin: 0 0 0 5px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-calendar-prev,
|
.full-calendar-buttons button span {
|
||||||
.full-calendar-next {
|
padding: 0 10px;
|
||||||
width: 40px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* To always display the "today" button:
|
||||||
|
*
|
||||||
|
* .full-calendar-buttons button.today {
|
||||||
|
* visibility: visible !important;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* table layout & outer border */
|
/* table layout & outer border */
|
||||||
|
@ -42,14 +49,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* cell styling */
|
/* cell styling */
|
||||||
|
|
||||||
.full-calendar-month th,
|
.full-calendar-month th,
|
||||||
.full-calendar-month td.day {
|
.full-calendar-month td.day {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
border-style: solid; /* inner border style */
|
border-style: solid; /* inner border style */
|
||||||
border-color: #ccc; /* inner border color */
|
border-color: #ccc; /* inner border color */
|
||||||
border-width: 1px 0 0 1px;
|
border-width: 1px 0 0 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,10 +88,14 @@
|
||||||
padding: 2px 2px 0; /* distance between events and day edges */
|
padding: 2px 2px 0; /* distance between events and day edges */
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-calendar-month td.day {
|
/* FullCalendar automatically chooses a cell's height,
|
||||||
/* FullCalendar automatically chooses a height, but this can be overridden: */
|
* but this can be overridden:
|
||||||
/* height: 100px !important; */
|
*
|
||||||
}
|
* .full-calendar-month td.day {
|
||||||
|
* height: 100px !important;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,11 +154,12 @@
|
||||||
.full-calendar-month .over-day {
|
.full-calendar-month .over-day {
|
||||||
background: #ADDBFF;
|
background: #ADDBFF;
|
||||||
opacity: .2;
|
opacity: .2;
|
||||||
filter: alpha(opacity=20);
|
filter: alpha(opacity=20); /* for IE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* right-to-left support */
|
/* right-to-left support */
|
||||||
|
|
||||||
.r2l .full-calendar-title {
|
.r2l .full-calendar-title {
|
||||||
|
@ -157,7 +170,7 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.r2l .full-calendar-buttons input {
|
.r2l .full-calendar-buttons button {
|
||||||
margin: 0 5px 0 0;
|
margin: 0 5px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,16 @@
|
||||||
refreshMonth();
|
refreshMonth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prevYear() {
|
||||||
|
addYears(date, -1);
|
||||||
|
refreshMonth();
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextYear() {
|
||||||
|
addYears(date, 1);
|
||||||
|
refreshMonth();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -133,6 +143,8 @@
|
||||||
nextMonth: nextMonth,
|
nextMonth: nextMonth,
|
||||||
today: gotoToday,
|
today: gotoToday,
|
||||||
gotoMonth: gotoMonth,
|
gotoMonth: gotoMonth,
|
||||||
|
prevYear: prevYear,
|
||||||
|
nextYear: nextYear,
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -276,31 +288,53 @@
|
||||||
|
|
||||||
if (bo) { // "button options"
|
if (bo) { // "button options"
|
||||||
var buttons = $("<div class='full-calendar-buttons'/>").appendTo(header);
|
var buttons = $("<div class='full-calendar-buttons'/>").appendTo(header);
|
||||||
var prevButton, nextButton;
|
if (bo == true || bo.today !== false) {
|
||||||
if (bo == true || bo.today != false) {
|
todayButton = $("<button class='today' />")
|
||||||
todayButton = $("<input type='button' class='full-calendar-today' value='today'/>")
|
.append($("<span />").html(
|
||||||
|
typeof bo.today == 'string' ?
|
||||||
|
bo.today : "today"))
|
||||||
.click(gotoToday);
|
.click(gotoToday);
|
||||||
if (typeof bo.today == 'string') todayButton.val(bo.today);
|
|
||||||
buttons.append(todayButton);
|
buttons.append(todayButton);
|
||||||
}
|
}
|
||||||
if (bo == true || bo.prev != false) {
|
if (bo.prevYear) {
|
||||||
prevButton = $("<input type='button' class='full-calendar-prev' value='" + (r2l ? ">" : "<") + "'/>")
|
var b = $("<button class='prev-year' />")
|
||||||
.click(prevMonth);
|
.append($("<span />")
|
||||||
if (typeof bo.prev == 'string') prevButton.val(bo.prev);
|
.html(typeof bo.prevYear == 'string' ?
|
||||||
if (r2l) buttons.prepend(prevButton);
|
bo.prevYear : "«"))
|
||||||
else buttons.append(prevButton);
|
.click(prevYear);
|
||||||
|
if (r2l) buttons.prepend(b);
|
||||||
|
else buttons.append(b);
|
||||||
}
|
}
|
||||||
if (bo == true || bo.next != false) {
|
if (bo == true || bo.prevMonth !== false) {
|
||||||
nextButton = $("<input type='button' class='full-calendar-next' value='" + (r2l ? "<" : ">") + "'/>")
|
var b = $("<button class='prev-month' />")
|
||||||
|
.append($("<span />")
|
||||||
|
.html(typeof bo.prevMonth == 'string' ?
|
||||||
|
bo.prevMonth : (r2l ? ">" : "<")))
|
||||||
|
.click(prevMonth);
|
||||||
|
if (r2l) buttons.prepend(b);
|
||||||
|
else buttons.append(b);
|
||||||
|
}
|
||||||
|
if (bo == true || bo.nextMonth !== false) {
|
||||||
|
var b = $("<button class='next-month' />")
|
||||||
|
.append($("<span />").html(typeof bo.nextMonth == 'string' ?
|
||||||
|
bo.nextMonth : (r2l ? "<" : ">")))
|
||||||
.click(nextMonth);
|
.click(nextMonth);
|
||||||
if (typeof bo.next == 'string') nextButton.val(bo.next);
|
if (r2l) buttons.prepend(b);
|
||||||
if (r2l) buttons.prepend(nextButton);
|
else buttons.append(b);
|
||||||
else buttons.append(nextButton);
|
}
|
||||||
|
if (bo.nextYear) {
|
||||||
|
var b = $("<button class='next-year' />")
|
||||||
|
.append($("<span />").html(typeof bo.nextYear == 'string'
|
||||||
|
? bo.nextYear : "»"))
|
||||||
|
.click(nextYear);
|
||||||
|
if (r2l) buttons.prepend(b);
|
||||||
|
else buttons.append(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.title !== false)
|
if (options.title !== false) {
|
||||||
titleElement = $("<h2 class='full-calendar-title'/>").appendTo(header);
|
titleElement = $("<h2 class='full-calendar-title'/>").appendTo(header);
|
||||||
|
}
|
||||||
|
|
||||||
monthElement = $("<div class='full-calendar-month' style='position:relative'/>")
|
monthElement = $("<div class='full-calendar-month' style='position:relative'/>")
|
||||||
.appendTo($("<div class='full-calendar-month-wrap'/>").appendTo(this));
|
.appendTo($("<div class='full-calendar-month-wrap'/>").appendTo(this));
|
||||||
|
@ -1082,6 +1116,12 @@
|
||||||
return clearTime(d);
|
return clearTime(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addYears(d, n, keepTime) {
|
||||||
|
d.setFullYear(d.getFullYear() + n);
|
||||||
|
if (keepTime) return d;
|
||||||
|
return clearTime(d);
|
||||||
|
}
|
||||||
|
|
||||||
function addDays(d, n, keepTime) {
|
function addDays(d, n, keepTime) {
|
||||||
d.setDate(d.getDate() + n);
|
d.setDate(d.getDate() + n);
|
||||||
if (keepTime) return d;
|
if (keepTime) return d;
|
||||||
|
|
|
@ -27,7 +27,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
weekStart: 1,
|
weekStart: 1,
|
||||||
|
|
||||||
rightToLeft: true,
|
//rightToLeft: true,
|
||||||
|
|
||||||
events: [
|
events: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -101,6 +101,8 @@ function removeTestEvents(therepeating) {
|
||||||
<a href='#' onclick="$('#calendar').fullCalendar('today')">today</a>
|
<a href='#' onclick="$('#calendar').fullCalendar('today')">today</a>
|
||||||
<a href='#' onclick="$('#calendar').fullCalendar('prevMonth')">prev</a>
|
<a href='#' onclick="$('#calendar').fullCalendar('prevMonth')">prev</a>
|
||||||
<a href='#' onclick="$('#calendar').fullCalendar('nextMonth')">next</a>
|
<a href='#' onclick="$('#calendar').fullCalendar('nextMonth')">next</a>
|
||||||
|
<a href='#' onclick="$('#calendar').fullCalendar('prevYear')">prevyear</a>
|
||||||
|
<a href='#' onclick="$('#calendar').fullCalendar('nextYear')">nextyear</a>
|
||||||
<a href='#' onclick="$('#calendar').fullCalendar('gotoMonth', 1986, 5)">June 1986</a>
|
<a href='#' onclick="$('#calendar').fullCalendar('gotoMonth', 1986, 5)">June 1986</a>
|
||||||
</p>
|
</p>
|
||||||
<div id='calendar' style='width:75%'></div>
|
<div id='calendar' style='width:75%'></div>
|
||||||
|
|
|
@ -26,7 +26,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
|
||||||
fixedWeeks: false,
|
fixedWeeks: true,
|
||||||
|
|
||||||
abbrevDayHeadings: false,
|
abbrevDayHeadings: false,
|
||||||
|
|
||||||
|
@ -34,10 +34,14 @@ $(document).ready(function() {
|
||||||
titleFormat: 'm/Y', //'n/Y', //'M y',
|
titleFormat: 'm/Y', //'n/Y', //'M y',
|
||||||
|
|
||||||
//buttons: false,
|
//buttons: false,
|
||||||
buttons: { today:false, prev:"prev", next:"next" },
|
//buttons: { today:false },
|
||||||
|
//buttons: { today:false, prevMonth:"prev", nextMonth:"next" },
|
||||||
|
//buttons: { today:true, prevMonth:false, nextMonth:"next" },
|
||||||
|
//buttons: { prevYear:true, nextYear:true },
|
||||||
|
//buttons: { today:true, prevYear:"py", prevMonth:true, nextMonth:true, nextYear:"ny" },
|
||||||
|
|
||||||
showTime: true,
|
showTime: true,
|
||||||
timeFormat: 'H:i', //'ha', //'GA', //'gX',
|
timeFormat: 'ha', //'H:i', //'GA', //'gX',
|
||||||
|
|
||||||
eventDragOpacity: .5,
|
eventDragOpacity: .5,
|
||||||
eventRevertDuration: 2000,
|
eventRevertDuration: 2000,
|
||||||
|
|
|
@ -15,10 +15,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<script type='text/javascript' src='legacy_jquery/jquery.js'></script>
|
||||||
|
<script type='text/javascript' src='legacy_jquery/ui.core.js'></script>
|
||||||
|
<script type='text/javascript' src='legacy_jquery/ui.draggable.js'></script>
|
||||||
|
-->
|
||||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||||
<script type='text/javascript' src='../jquery/ui.core.js'></script>
|
<script type='text/javascript' src='../jquery/ui.core.js'></script>
|
||||||
<script type='text/javascript' src='../jquery/ui.draggable.js'></script>
|
<script type='text/javascript' src='../jquery/ui.draggable.js'></script>
|
||||||
|
|
||||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.js'></script>
|
<script type='text/javascript' src='../fullcalendar/fullcalendar.js'></script>
|
||||||
|
<!--<script type='text/javascript' src='../build/fullcalendar.min.js'></script>-->
|
||||||
<script type='text/javascript' src='../fullcalendar/gcal.js'></script>
|
<script type='text/javascript' src='../fullcalendar/gcal.js'></script>
|
||||||
<script type='text/javascript' src='jgrowl/jgrowl.js'></script>
|
<script type='text/javascript' src='jgrowl/jgrowl.js'></script>
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
|
Loading…
Reference in a new issue