From a327fd6ab3fccbe685b48900d55e514409c0274f Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 30 Nov 2009 23:11:38 -0800 Subject: [PATCH] modified docs, default-ized minTime/maxTime --- docs/index.txt | 10 ++++++++++ docs/methods.txt | 34 +++++++++++++++++++++++++++++++--- docs/triggered-actions.txt | 3 +++ src/agenda.js | 8 +++++--- tests/options.html | 3 ++- 5 files changed, 51 insertions(+), 7 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 43061bd..850e984 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -122,6 +122,16 @@ Basic Options In the agenda views, when a :ref:`CalEvent ` has an unspecified end date, determines the length (in minutes) the event appears to be. +**minTime**: Integer/String, *Default*: ``0`` + In the agenda views, determines the first hour/time that will be displayed, even when + the scollbars have been scrolled all the way up. This can be a number like ``5`` (which + means 5am), a string like ``'5:30'`` (which means 5:30am) or a string like ``'5:30am'``. + +**maxTime**: Integer/String, *Default*: ``24`` + In the agenda views, determines the last hour/time that will be displayed, even when + the scrollbars have been scrolled all the way down. This can be a number like ``22`` (which + means 10pm), a string like ``'22:30'`` (which means 10:30pm) or a string like ``'10:30pm'``. + Event Editing ============= diff --git a/docs/methods.txt b/docs/methods.txt index 740a800..23d1109 100755 --- a/docs/methods.txt +++ b/docs/methods.txt @@ -28,6 +28,16 @@ jQuery object: Immediately switches to a different view. ``viewName`` must be one of the :ref:`available-views`. +**getView** - .fullCalendar('getView') + Returns the :ref:`View Object ` for the current view. + This is useful if you want to get information about the calendar's title + or start/end dates. + +**getDate** - .fullCalendar('getDate') + Returns a Date object for the current date of the calendar. For month view, + it will always be sometime between the first and last day of the month. For week view, + it will always be sometime between the first and last day of the week. + **updateEvent** - .fullCalendar('updateEvent', *calEvent*) Reports changes to a :ref:`CalEvent's ` standard properties. This will cause the event to be rerendered on the calendar. @@ -83,7 +93,25 @@ jQuery object: Refetches events from all sources and rerenders them on the screen. **render** - .fullCalendar(``'render'``) - Immediately renders the calendar. This method is automatically called if the $().fullCalendar - plugin is called on a visible element. However, if a hidden/invisible element is initialized - with FullCalendar, this method must be explicitly called as soon as the element becomes visible. + Immediately renders the calendar if is is not already visible. + If the calendar *is* already visible, readjusts its size. + + This method is useful in the scenario where a tab setup might hide/show + a calendar. Call this method whenever the calendar's tab is shown. + + +Dynamically Getting/Setting Properties +-------------------------------------- + +You may dynamically *retrieve* any of a FullCalendar's options using the following form:: + + $('#calendar').fullCalendar('option', 'optionName'); // returns the value + +You may dynamically *set* some of FullCalendar's options using the following form:: + + $('#calendar').fullCalendar('option', 'optionName', 'optionValue'); + +**HOWEVER**, setting only works for the three following options: **apsectRatio**, **contentHeight**, and **height**. + +The next version of FullCalendar will have more advancements in this area. \ No newline at end of file diff --git a/docs/triggered-actions.txt b/docs/triggered-actions.txt index 7097952..cb4ad58 100755 --- a/docs/triggered-actions.txt +++ b/docs/triggered-actions.txt @@ -44,6 +44,9 @@ always available (:ref:`more below `). This function is great for attaching other jQuery plugins to each event element, such as a `qTip `_ tooltip effect. + +**eventAfterRender**: function(calEvent, element, view) + Triggered after an event is rendered on the calendar and its position has been chosen. **eventClick**, **eventMouseover**, **eventMouseout**: function(*calEvent, jsEvent, view*) Triggered on click/mouseover/mouseout actions for an event. diff --git a/src/agenda.js b/src/agenda.js index 9224167..87be57f 100755 --- a/src/agenda.js +++ b/src/agenda.js @@ -14,7 +14,9 @@ setDefaults({ }, dragOpacity: { agenda: .5 - } + }, + minTime: 0, + maxTime: 24 }); views.agendaWeek = function(element, options) { @@ -130,8 +132,8 @@ function Agenda(element, options, methods) { dis = 1; dit = 0; } - minMinute = parseTime(options.minTime || 0); - maxMinute = parseTime(options.maxTime || 24); + minMinute = parseTime(options.minTime); + maxMinute = parseTime(options.maxTime); var d0 = rtl ? addDays(cloneDate(view.visEnd), -1) : cloneDate(view.visStart), d = cloneDate(d0), diff --git a/tests/options.html b/tests/options.html index e52c373..dca8d34 100644 --- a/tests/options.html +++ b/tests/options.html @@ -29,7 +29,8 @@ //weekends: false, - height: 500, + //contentHeight: 500, + height: 700, header: {