diff --git a/phpgwapi/inc/jscalendar/README b/phpgwapi/inc/jscalendar/README deleted file mode 100644 index c0af3edd1e..0000000000 --- a/phpgwapi/inc/jscalendar/README +++ /dev/null @@ -1,35 +0,0 @@ -The DHTML Calendar -------------------- - - Author: Mihai Bazon, - http://students.infoiasi.ro/~mishoo - - This program is free software published under the - GNU Lesser General Public License. - - For the entire license text please refer to - http://www.gnu.org/licenses/lgpl - - An additional restriction is that you are not allowed - to remove the comment note present at the beginning of - the script. - -Contents ---------- - - calendar.js -- the main program file - lang/*.js -- internalization files - *.css -- color themes - cal.html -- example usage file - doc/ -- documentation, in PDF and HTML - simple-1.html -- quick setup examples [popup calendars] - simple-2.html -- quick setup example for flat calendar - -Homepage ---------- - - For details and latest versions please refer to calendar - homepage, located on my website: - - http://students.infoiasi.ro/~mishoo/site/calendar.epl - diff --git a/phpgwapi/inc/jscalendar/README-phpGW b/phpgwapi/inc/jscalendar/README-phpGW deleted file mode 100644 index e2e03973fa..0000000000 --- a/phpgwapi/inc/jscalendar/README-phpGW +++ /dev/null @@ -1,9 +0,0 @@ -This directory contains the (unchanged) Version 0.9.3 of jsCalendar - -jsCalendar is called by the jscalendar wrapper-class in the phpGW API - -Instead of jscalendar-setup.js and a lang/*.js file it loads jscalendar-setup.php, -which sets all jscalendar preferences (partly from the users prefs) and read the -translations from the database for the language the user has spec. in his prefs. - -RalfBecker@outdoor-training.de diff --git a/phpgwapi/inc/jscalendar/bugtest-hidden-selects.html b/phpgwapi/inc/jscalendar/bugtest-hidden-selects.html deleted file mode 100644 index 900bc17e8b..0000000000 --- a/phpgwapi/inc/jscalendar/bugtest-hidden-selects.html +++ /dev/null @@ -1,108 +0,0 @@ - - - -Bug - - - - - - - - - - - - - -
-Date: -
- - -

-
-
Visible <select>, hides and unhides as expected -
- - -

-
Hidden <select>, it should stay hidden (but doesn't) -
- - -

-
Hidden textbox below, it stays hidden as expected -
- -

- diff --git a/phpgwapi/inc/jscalendar/cal.html b/phpgwapi/inc/jscalendar/cal.html deleted file mode 100644 index 8ea6b9506f..0000000000 --- a/phpgwapi/inc/jscalendar/cal.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - -The Coolest DHTML Calendar - Online Demo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The coolest DHTML calendar, v. 0.9.3 "It's still alife"

- -

Theme -[ -winter -| -summer -| -green -| -win2k-1 -| -win2k-2 -| -win2k-cold-1 -| -win2k-cold-2 -| -system - -] -
-Release notes for 0.9.3 -
-Setup a calendar in minutes: - popup calendar, - flat calendar. -
-Documentation: - HTML, - PDF -

- -
- -
-Flat calendar -
- -

A non-popup version will appear below as soon -as the page is loaded. Note that it doesn't show the week number.

- - -
-
- -

-The example above uses the setDisabledHandler() member function -to setup a handler that would only enable days withing a range of 10 days, -forward or backward, from the current date. -

- -
- -
- -

Easy I18N: all messages are separate JS -files (see calendar-en.js for an example). -Check the lang directory in your distribution archive to see what languages -are available. You just need to include the right one from the HTML -page.

- -

NOTE: I made the English and Romanian -versions only. The other lang files were submitted by people. I thank them -very much, and you should too! :) Unfortunately, I lost track of these files -and the persons who sent them, so if you send me a translation file please -include a small comment with your name and email address, as you are the -author. Also, a statement that the file is distributed under the GNU LGPL -would be welcome :)

- -
- -
-
-
-Popup examples -
- -
- -Date #1: [y-m-d [ww]] -- single -click
- -Date #2: [DD, MM d, y] --- double click - -

- - -this select should hide when the calendar is above it. -

- -Date #3: [dd/mm/y] --- single click -
- -Date #4: [D, M d, y] -- -double click - -
-
- -

You can find more information about this script (and how to use/customize -it) on my -page.

- -

This is release 0.9.3. Works on MSIE 5.0, 5.5, 6.0, Opera 7, -Mozilla, Netscape 6.x, 7.0 and all other Gecko-s.

- -

You can click on "Mo"/"Su" (first day name displayed) to -change the first day of week (Sunday/Monday) (since 0.8 this is also mapped -on the "-" button in the top-left corner). Use the navigation buttons -("<<", "<", "Today", ">", ">>") to move to the prev/next -year/month. Keep the mouse button pressed for a short time over one of -these buttons to get a menu for faster selection. You can drag the "status -bar" (that's where the tooltips appear) or title bar (that's where the -currently selected month/year shows up) to move the whole calendar.

- -

Keyboard navigation

- -

Starting with version 0.9.2, you can also use the keyboard to select -dates (only for popup calendars; does not work with Opera -7). The following keys are available:

- - - -

Date formatting

- - - -

Date parsing

- -

The algorithm will first try to read the date in the specified -format.

- -

If it doesn't work, it will try different methods to recognize a valid -date -- general behavior is: if some part of the input is the name -of a month, i.e. "Mar", then that will be considered the month, the -next/previous 1 .. 31 number will be considered the date and the next big -number (hopefully there) will be the year; if it's missing we assume the -current year. If no such name exists, then the first 1 .. 12 number will be -taken as the month, the next 1 .. 31 as the date; year selection is the same -as discussed.

- -

Examples: 3/8/1979 as well as 03 -08 79 as well as 1979 mar 8, as well as 79+3+8 will all lead to the same date: my birthday (March -8, 1979). To try the algo, just input the date using whatever format you -like in one of the fields above and click on the "..." button. The calendar -that shows up should contain your date, otherwise you and this algorithm -don't get too well together :)

- -
Author: Mihai -Bazon © 2002
Feel free to use / redistribute under the GNU LGPL.
Please no -not remove or alter the comment at the script start.
- -

If you use this script on a public page it -would be nice if you would let me -know.

- - diff --git a/phpgwapi/inc/jscalendar/calendar-blue.css b/phpgwapi/inc/jscalendar/calendar-blue.css deleted file mode 100644 index 502e19b219..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-blue.css +++ /dev/null @@ -1,178 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #556; - font-size: 11px; - color: #000; - cursor: default; - background: #eef; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #fff; - color: #000; - padding: 2px; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ - background: #778; - color: #fff; -} - -.calendar thead .daynames { /* Row containing the day names */ - background: #bdf; -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #556; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background: #aaf; - color: #000; - border: 1px solid #04f; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background: #77c; - padding: 2px 0px 0px 2px; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - color: #456; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #bdf; -} - -.calendar tbody .rowhilite td { - background: #def; -} - -.calendar tbody .rowhilite td.wn { - background: #eef; -} - -.calendar tbody td.hilite { /* Hovered cells */ - background: #def; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - background: #cde; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fff; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { /* Cell showing selected date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ - text-align: center; - background: #556; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #fff; - color: #445; - border-top: 1px solid #556; - padding: 1px; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #aaf; - border: 1px solid #04f; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #77c; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #def; - color: #000; - font-size: smaller; -} - -.combo .label { - width: 100%; - text-align: center; -} - -.combo .hilite { - background: #acf; -} - -.combo .active { - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - background: #eef; - font-weight: bold; -} diff --git a/phpgwapi/inc/jscalendar/calendar-brown.css b/phpgwapi/inc/jscalendar/calendar-brown.css deleted file mode 100644 index e1e8457df9..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-brown.css +++ /dev/null @@ -1,171 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #655; - font-size: 11px; - color: #000; - cursor: default; - background: #ffd; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #654; - color: #fed; - padding: 2px; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ - background: #edc; - color: #000; -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #655; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background: #faa; - color: #000; - border: 1px solid #f40; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background: #c77; - padding: 2px 0px 0px 2px; -} - -.calendar thead .daynames { /* Row containing the day names */ - background: #fed; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #fed; -} - -.calendar tbody .rowhilite td { - background: #ddf; -} - -.calendar tbody .rowhilite td.wn { - background: #efe; -} - -.calendar tbody td.hilite { /* Hovered cells */ - background: #ffe; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - background: #ddc; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fea; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { font-weight: bold; } - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ - text-align: center; - background: #988; - color: #000; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - border-top: 1px solid #655; - background: #dcb; - color: #840; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #faa; - border: 1px solid #f40; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #c77; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #ffe; - color: #000; - font-size: smaller; -} - -.combo .label { - width: 100%; - text-align: center; -} - -.combo .hilite { - background: #fc8; -} - -.combo .active { - border-top: 1px solid #a64; - border-bottom: 1px solid #a64; - background: #fee; - font-weight: bold; -} diff --git a/phpgwapi/inc/jscalendar/calendar-green.css b/phpgwapi/inc/jscalendar/calendar-green.css deleted file mode 100644 index c59aaa5aa7..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-green.css +++ /dev/null @@ -1,175 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #565; - font-size: 11px; - color: #000; - cursor: default; - background: #efe; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ - background: #676; - color: #fff; - font-size: 90%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - padding: 2px; - background: #250; - color: #efa; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #565; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background: #afa; - color: #000; - border: 1px solid #084; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background: #7c7; - padding: 2px 0px 0px 2px; -} - -.calendar thead .daynames { /* Row containing the day names */ - background: #dfb; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - color: #564; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #dfb; -} - -.calendar tbody .rowhilite td { - background: #dfd; -} - -.calendar tbody .rowhilite td.wn { - background: #efe; -} - -.calendar tbody td.hilite { /* Hovered cells */ - background: #efd; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - background: #dec; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #f8fff8; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { font-weight: bold; color: #0a0; } - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ - text-align: center; - background: #565; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - padding: 2px; - background: #250; - color: #efa; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #afa; - border: 1px solid #084; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #7c7; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #565; - background: #efd; - color: #000; - font-size: smaller; -} - -.combo .label { - width: 100%; - text-align: center; -} - -.combo .hilite { - background: #af8; -} - -.combo .active { - border-top: 1px solid #6a4; - border-bottom: 1px solid #6a4; - background: #efe; - font-weight: bold; -} diff --git a/phpgwapi/inc/jscalendar/calendar-setup.js b/phpgwapi/inc/jscalendar/calendar-setup.js deleted file mode 100644 index 4c3ace149e..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-setup.js +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://students.infoiasi.ro/~mishoo/site/calendar.epl - * - * Feel free to use this script under the terms of the GNU Lesser General - * Public License, as long as you do not remove or alter this notice. - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. - */ - -// $Id$ - -/** - * This function "patches" an input field (or other element) to use a calendar - * widget for date selection. - * - * The "params" is a single object that can have the following properties: - * - * prop. name | description - * ------------------------------------------------------------------------------------------------- - * inputField | the ID of an input field to store the date - * displayArea | the ID of a DIV or other element to show the date - * button | ID of a button or other element that will trigger the calendar - * eventName | event that will trigger the calendar, without the "on" prefix (default: "click") - * ifFormat | date format that will be stored in the input field - * daFormat | the date format that will be used to display the date in displayArea - * singleClick | (true/false) wether the calendar is in single click mode or not (default: true) - * mondayFirst | (true/false) if true Monday is the first day of week, Sunday otherwise (default: false) - * align | alignment (default: "Bl"); if you don't know what's this see the calendar documentation - * range | array with 2 elements. Default: [1900, 2999] -- the range of years available - * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers - * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID - * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar) - * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar - * - * None of them is required, they all have default values. However, if you - * pass none of "inputField", "displayArea" or "button" you'll get a warning - * saying "nothing to setup". - */ -Calendar.setup = function (params) { - function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; - - param_default("inputField", null); - param_default("displayArea", null); - param_default("button", null); - param_default("eventName", "click"); - param_default("ifFormat", "y/mm/dd"); - param_default("daFormat", "y/mm/dd"); - param_default("singleClick", true); - param_default("disableFunc", null); - param_default("mondayFirst", false); - param_default("align", "Bl"); - param_default("range", [1900, 2999]); - param_default("weekNumbers", true); - param_default("flat", null); - param_default("flatCallback", null); - - var tmp = ["inputField", "displayArea", "button"]; - for (var i in tmp) { - if (typeof params[tmp[i]] == "string") { - params[tmp[i]] = document.getElementById(params[tmp[i]]); - } - } - if (!(params.flat || params.inputField || params.displayArea || params.button)) { - alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); - return false; - } - - function onSelect(cal) { - if (cal.params.flat) { - if (typeof cal.params.flatCallback == "function") { - cal.params.flatCallback(cal); - } else { - alert("No flatCallback given -- doing nothing."); - } - return false; - } - if (cal.params.inputField) { - cal.params.inputField.value = cal.date.print(cal.params.ifFormat); - } - if (cal.params.displayArea) { - cal.params.displayArea.innerHTML = cal.date.print(cal.params.daFormat); - } - if (cal.params.singleClick && cal.dateClicked) { - cal.callCloseHandler(); - } - }; - - if (params.flat != null) { - params.flat = document.getElementById(params.flat); - if (!params.flat) { - alert("Calendar.setup:\n Flat specified but can't find parent."); - return false; - } - var cal = new Calendar(params.mondayFirst, null, onSelect); - cal.params = params; - cal.weekNumbers = params.weekNumbers; - cal.setRange(params.range[0], params.range[1]); - cal.setDisabledHandler(params.disableFunc); - cal.create(params.flat); - cal.show(); - return false; - } - - var triggerEl = params.button || params.displayArea || params.inputField; - triggerEl["on" + params.eventName] = function() { - var dateEl = params.inputField || params.displayArea; - var dateFmt = params.inputField ? params.ifFormat : params.daFormat; - var mustCreate = false; - if (!window.calendar) { - window.calendar = new Calendar(params.mondayFirst, null, onSelect, function(cal) { cal.hide(); }); - window.calendar.weekNumbers = params.weekNumbers; - mustCreate = true; - } else { - window.calendar.hide(); - } - window.calendar.setRange(params.range[0], params.range[1]); - window.calendar.params = params; - window.calendar.setDisabledHandler(params.disableFunc); - window.calendar.setDateFormat(dateFmt); - if (mustCreate) { - window.calendar.create(); - } - window.calendar.parseDate(dateEl.value || dateEl.innerHTML); - window.calendar.refresh(); - window.calendar.showAtElement(params.displayArea || params.inputField, params.align); - return false; - }; -}; diff --git a/phpgwapi/inc/jscalendar/calendar-setup_stripped.js b/phpgwapi/inc/jscalendar/calendar-setup_stripped.js deleted file mode 100644 index 7a89ddd3e8..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-setup_stripped.js +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://students.infoiasi.ro/~mishoo/site/calendar.epl - * - * Feel free to use this script under the terms of the GNU Lesser General - * Public License, as long as you do not remove or alter this notice. - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. - */ -Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","y/mm/dd");param_default("daFormat","y/mm/dd");param_default("singleClick",true);param_default("disableFunc",null);param_default("mondayFirst",false);param_default("align","Bl");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false;}function onSelect(cal){if(cal.params.flat){if(typeof cal.params.flatCallback=="function"){cal.params.flatCallback(cal);}else{alert("No flatCallback given -- doing nothing.");}return false;}if(cal.params.inputField){cal.params.inputField.value=cal.date.print(cal.params.ifFormat);}if(cal.params.displayArea){cal.params.displayArea.innerHTML=cal.date.print(cal.params.daFormat);}if(cal.params.singleClick&&cal.dateClicked){cal.callCloseHandler();}};if(params.flat!=null){params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n Flat specified but can't find parent.");return false;}var cal=new Calendar(params.mondayFirst,null,onSelect);cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDisabledHandler(params.disableFunc);cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;if(!window.calendar){window.calendar=new Calendar(params.mondayFirst,null,onSelect,function(cal){cal.hide();});window.calendar.weekNumbers=params.weekNumbers;mustCreate=true;}else{window.calendar.hide();}window.calendar.setRange(params.range[0],params.range[1]);window.calendar.params=params;window.calendar.setDisabledHandler(params.disableFunc);window.calendar.setDateFormat(dateFmt);if(mustCreate){window.calendar.create();}window.calendar.parseDate(dateEl.value||dateEl.innerHTML);window.calendar.refresh();window.calendar.showAtElement(params.displayArea||params.inputField,params.align);return false;};}; \ No newline at end of file diff --git a/phpgwapi/inc/jscalendar/calendar-system.css b/phpgwapi/inc/jscalendar/calendar-system.css deleted file mode 100644 index 34db1f62af..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-system.css +++ /dev/null @@ -1,194 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border: 1px solid; - border-color: #fff #000 #000 #fff; - font-size: 11px; - cursor: default; - background: Window; - color: WindowText; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border: 1px solid; - border-color: #fff #000 #000 #fff; - font-size: 11px; - cursor: default; - background: Window; - color: WindowText; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; - background: ButtonFace; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: ActiveCaption; - color: CaptionText; - text-align: center; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .daynames { /* Row containing the day names */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid ButtonShadow; - padding: 2px; - text-align: center; - background: ButtonFace; - color: ButtonText; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-width: 2px; - padding: 0px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - border-width: 1px; - padding: 2px 0px 0px 2px; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid ButtonShadow; - background: ButtonFace; - color: ButtonText; -} - -.calendar tbody .rowhilite td { - background: #eee; - color: #000; -} - -.calendar tbody td.hilite { /* Hovered cells */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody td.disabled { color: GrayText; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: ButtonFace; - padding: 1px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - color: ButtonText; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4e0d8; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; - background: Menu; - color: MenuText; - font-size: smaller; - padding: 1px; -} - -.combo .label { - text-align: center; - padding: 1px; -} - -.combo .active { - padding: 0px; - border: 1px solid #000; -} - -.combo .hilite { - background: Highlight; - color: HighlightText; -} diff --git a/phpgwapi/inc/jscalendar/calendar-win2k-1.css b/phpgwapi/inc/jscalendar/calendar-win2k-1.css deleted file mode 100644 index 7521c66534..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-win2k-1.css +++ /dev/null @@ -1,217 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #d4d0c8; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #d4d0c8; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #848078; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .daynames { /* Row containing the day names */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #f4f0e8; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background: #e4e0d8; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background: #c4c0b8; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #f4f0e8; -} - -.calendar tbody .rowhilite td { - background: #e4e0d8; -} - -.calendar tbody .rowhilite td.wn { - background: #d4d0c8; -} - -.calendar tbody td.hilite { /* Hovered cells */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #e4e0d8; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #f4f0e8; - padding: 1px; - border: 1px solid #000; - background: #848078; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4e0d8; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #e4e0d8; - font-size: smaller; - padding: 1px; -} - -.combo .label { - text-align: center; - padding: 1px; -} - -.combo .active { - background: #c4c0b8; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.combo .hilite { - background: #048; - color: #fea; -} diff --git a/phpgwapi/inc/jscalendar/calendar-win2k-2.css b/phpgwapi/inc/jscalendar/calendar-win2k-2.css deleted file mode 100644 index 398e78efec..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-win2k-2.css +++ /dev/null @@ -1,217 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #d4c8d0; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #d4c8d0; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #847880; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .daynames { /* Row containing the day names */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #f4e8f0; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background: #e4d8e0; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background: #c4b8c0; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #f4e8f0; -} - -.calendar tbody .rowhilite td { - background: #e4d8e0; -} - -.calendar tbody .rowhilite td.wn { - background: #d4c8d0; -} - -.calendar tbody td.hilite { /* Hovered cells */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #e4d8e0; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #f4e8f0; - padding: 1px; - border: 1px solid #000; - background: #847880; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4d8e0; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #e4d8e0; - font-size: smaller; - padding: 1px; -} - -.combo .label { - text-align: center; - padding: 1px; -} - -.combo .active { - background: #d4c8d0; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.combo .hilite { - background: #408; - color: #fea; -} diff --git a/phpgwapi/inc/jscalendar/calendar-win2k-cold-1.css b/phpgwapi/inc/jscalendar/calendar-win2k-cold-1.css deleted file mode 100644 index f12852e8ec..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-win2k-cold-1.css +++ /dev/null @@ -1,211 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d0d4; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d0d4; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #788084; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .daynames { /* Row containing the day names */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #e8f0f4; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background: #d8e0e4; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background: #b8c0c4; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #e8f4f0; -} - -.calendar tbody .rowhilite td { - background: #d8e4e0; -} - -.calendar tbody .rowhilite td.wn { - background: #c8d4d0; -} - -.calendar tbody td.hilite { /* Hovered cells */ - padding: 1px 3px 1px 1px; - border: 1px solid; - border-color: #fff #000 #000 #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: #000 #fff #fff #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: #000 #fff #fff #000; - background: #d8e0e4; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #e8f0f4; - padding: 1px; - border: 1px solid #000; - background: #788084; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #d8e0e4; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #d8e0e4; - font-size: smaller; - padding: 1px; -} - -.combo .label { - text-align: center; - padding: 1px; -} - -.combo .active { - background: #c8d0d4; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.combo .hilite { - background: #048; - color: #aef; -} diff --git a/phpgwapi/inc/jscalendar/calendar-win2k-cold-2.css b/phpgwapi/inc/jscalendar/calendar-win2k-cold-2.css deleted file mode 100644 index a8ca89e3bb..0000000000 --- a/phpgwapi/inc/jscalendar/calendar-win2k-cold-2.css +++ /dev/null @@ -1,217 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d4d0; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d4d0; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #788480; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ -} - -.calendar thead .daynames { /* Row containing the day names */ -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #e8f4f0; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background: #d8e4e0; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background: #b8c4c0; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #e8f4f0; -} - -.calendar tbody .rowhilite td { - background: #d8e4e0; -} - -.calendar tbody .rowhilite td.wn { - background: #c8d4d0; -} - -.calendar tbody td.hilite { /* Hovered cells */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #d8e4e0; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #e8f4f0; - padding: 1px; - border: 1px solid #000; - background: #788480; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #d8e4e0; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #d8e4e0; - font-size: smaller; - padding: 1px; -} - -.combo .label { - text-align: center; - padding: 1px; -} - -.combo .active { - background: #c8d4d0; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.combo .hilite { - background: #048; - color: #aef; -} diff --git a/phpgwapi/inc/jscalendar/calendar.js b/phpgwapi/inc/jscalendar/calendar.js deleted file mode 100644 index ceaf185f61..0000000000 --- a/phpgwapi/inc/jscalendar/calendar.js +++ /dev/null @@ -1,1379 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo - * --------------------------------------------------------------------------- - * - * The DHTML Calendar, version 0.9.3 "It's still alive & keeps rocking" - * - * Details and latest version at: - * http://students.infoiasi.ro/~mishoo/site/calendar.epl - * - * Feel free to use this script under the terms of the GNU Lesser General - * Public License, as long as you do not remove or alter this notice. - */ - -// $Id$ - -/** The Calendar object constructor. */ -Calendar = function (mondayFirst, dateStr, onSelected, onClose) { - // member variables - this.activeDiv = null; - this.currentDateEl = null; - this.checkDisabled = null; - this.timeout = null; - this.onSelected = onSelected || null; - this.onClose = onClose || null; - this.dragging = false; - this.hidden = false; - this.minYear = 1970; - this.maxYear = 2050; - this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"]; - this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"]; - this.isPopup = true; - this.weekNumbers = true; - this.mondayFirst = mondayFirst; - this.dateStr = dateStr; - this.ar_days = null; - // HTML elements - this.table = null; - this.element = null; - this.tbody = null; - this.firstdayname = null; - // Combo boxes - this.monthsCombo = null; - this.yearsCombo = null; - this.hilitedMonth = null; - this.activeMonth = null; - this.hilitedYear = null; - this.activeYear = null; - // Information - this.dateClicked = false; - - // one-time initializations - if (!Calendar._DN3) { - // table of short day names - var ar = new Array(); - for (var i = 8; i > 0;) { - ar[--i] = Calendar._DN[i].substr(0, 3); - } - Calendar._DN3 = ar; - // table of short month names - ar = new Array(); - for (var i = 12; i > 0;) { - ar[--i] = Calendar._MN[i].substr(0, 3); - } - Calendar._MN3 = ar; - } -}; - -// ** constants - -/// "static", needed for event handlers. -Calendar._C = null; - -/// detect a special case of "web browser" -Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && - !/opera/i.test(navigator.userAgent) ); - -// short day names array (initialized at first constructor call) -Calendar._DN3 = null; - -// short month names array (initialized at first constructor call) -Calendar._MN3 = null; - -// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate -// library, at some point. - -Calendar.getAbsolutePos = function(el) { - var r = { x: el.offsetLeft, y: el.offsetTop }; - if (el.offsetParent) { - var tmp = Calendar.getAbsolutePos(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; -}; - -Calendar.isRelated = function (el, evt) { - var related = evt.relatedTarget; - if (!related) { - var type = evt.type; - if (type == "mouseover") { - related = evt.fromElement; - } else if (type == "mouseout") { - related = evt.toElement; - } - } - while (related) { - if (related == el) { - return true; - } - related = related.parentNode; - } - return false; -}; - -Calendar.removeClass = function(el, className) { - if (!(el && el.className)) { - return; - } - var cls = el.className.split(" "); - var ar = new Array(); - for (var i = cls.length; i > 0;) { - if (cls[--i] != className) { - ar[ar.length] = cls[i]; - } - } - el.className = ar.join(" "); -}; - -Calendar.addClass = function(el, className) { - Calendar.removeClass(el, className); - el.className += " " + className; -}; - -Calendar.getElement = function(ev) { - if (Calendar.is_ie) { - return window.event.srcElement; - } else { - return ev.currentTarget; - } -}; - -Calendar.getTargetElement = function(ev) { - if (Calendar.is_ie) { - return window.event.srcElement; - } else { - return ev.target; - } -}; - -Calendar.stopEvent = function(ev) { - if (Calendar.is_ie) { - window.event.cancelBubble = true; - window.event.returnValue = false; - } else { - ev.preventDefault(); - ev.stopPropagation(); - } - return false; -}; - -Calendar.addEvent = function(el, evname, func) { - if (el.attachEvent) { // IE - el.attachEvent("on" + evname, func); - } else if (el.addEventListener) { // Gecko / W3C - el.addEventListener(evname, func, true); - } else { // Opera (or old browsers) - el["on" + evname] = func; - } -}; - -Calendar.removeEvent = function(el, evname, func) { - if (el.detachEvent) { // IE - el.detachEvent("on" + evname, func); - } else if (el.removeEventListener) { // Gecko / W3C - el.removeEventListener(evname, func, true); - } else { // Opera (or old browsers) - el["on" + evname] = null; - } -}; - -Calendar.createElement = function(type, parent) { - var el = null; - if (document.createElementNS) { - // use the XHTML namespace; IE won't normally get here unless - // _they_ "fix" the DOM2 implementation. - el = document.createElementNS("http://www.w3.org/1999/xhtml", type); - } else { - el = document.createElement(type); - } - if (typeof parent != "undefined") { - parent.appendChild(el); - } - return el; -}; - -// END: UTILITY FUNCTIONS - -// BEGIN: CALENDAR STATIC FUNCTIONS - -/** Internal -- adds a set of events to make some element behave like a button. */ -Calendar._add_evs = function(el) { - with (Calendar) { - addEvent(el, "mouseover", dayMouseOver); - addEvent(el, "mousedown", dayMouseDown); - addEvent(el, "mouseout", dayMouseOut); - if (is_ie) { - addEvent(el, "dblclick", dayMouseDblClick); - el.setAttribute("unselectable", true); - } - } -}; - -Calendar.findMonth = function(el) { - if (typeof el.month != "undefined") { - return el; - } else if (typeof el.parentNode.month != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.findYear = function(el) { - if (typeof el.year != "undefined") { - return el; - } else if (typeof el.parentNode.year != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.showMonthsCombo = function () { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var mc = cal.monthsCombo; - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - if (cal.activeMonth) { - Calendar.removeClass(cal.activeMonth, "active"); - } - var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()]; - Calendar.addClass(mon, "active"); - cal.activeMonth = mon; - mc.style.left = cd.offsetLeft + "px"; - mc.style.top = (cd.offsetTop + cd.offsetHeight) + "px"; - mc.style.display = "block"; -}; - -Calendar.showYearsCombo = function (fwd) { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var yc = cal.yearsCombo; - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - if (cal.activeYear) { - Calendar.removeClass(cal.activeYear, "active"); - } - cal.activeYear = null; - var Y = cal.date.getFullYear() + (fwd ? 1 : -1); - var yr = yc.firstChild; - var show = false; - for (var i = 12; i > 0; --i) { - if (Y >= cal.minYear && Y <= cal.maxYear) { - yr.firstChild.data = Y; - yr.year = Y; - yr.style.display = "block"; - show = true; - } else { - yr.style.display = "none"; - } - yr = yr.nextSibling; - Y += fwd ? 2 : -2; - } - if (show) { - yc.style.left = cd.offsetLeft + "px"; - yc.style.top = (cd.offsetTop + cd.offsetHeight) + "px"; - yc.style.display = "block"; - } -}; - -// event handlers - -Calendar.tableMouseUp = function(ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - if (cal.timeout) { - clearTimeout(cal.timeout); - } - var el = cal.activeDiv; - if (!el) { - return false; - } - var target = Calendar.getTargetElement(ev); - Calendar.removeClass(el, "active"); - if (target == el || target.parentNode == el) { - Calendar.cellClick(el); - } - var mon = Calendar.findMonth(target); - var date = null; - if (mon) { - date = new Date(cal.date); - if (mon.month != date.getMonth()) { - date.setMonth(mon.month); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } else { - var year = Calendar.findYear(target); - if (year) { - date = new Date(cal.date); - if (year.year != date.getFullYear()) { - date.setFullYear(year.year); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } - } - with (Calendar) { - removeEvent(document, "mouseup", tableMouseUp); - removeEvent(document, "mouseover", tableMouseOver); - removeEvent(document, "mousemove", tableMouseOver); - cal._hideCombos(); - _C = null; - return stopEvent(ev); - } -}; - -Calendar.tableMouseOver = function (ev) { - var cal = Calendar._C; - if (!cal) { - return; - } - var el = cal.activeDiv; - var target = Calendar.getTargetElement(ev); - if (target == el || target.parentNode == el) { - Calendar.addClass(el, "hilite active"); - Calendar.addClass(el.parentNode, "rowhilite"); - } else { - Calendar.removeClass(el, "active"); - Calendar.removeClass(el, "hilite"); - Calendar.removeClass(el.parentNode, "rowhilite"); - } - var mon = Calendar.findMonth(target); - if (mon) { - if (mon.month != cal.date.getMonth()) { - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - Calendar.addClass(mon, "hilite"); - cal.hilitedMonth = mon; - } else if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - } else { - var year = Calendar.findYear(target); - if (year) { - if (year.year != cal.date.getFullYear()) { - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - Calendar.addClass(year, "hilite"); - cal.hilitedYear = year; - } else if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.tableMouseDown = function (ev) { - if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) { - return Calendar.stopEvent(ev); - } -}; - -Calendar.calDragIt = function (ev) { - var cal = Calendar._C; - if (!(cal && cal.dragging)) { - return false; - } - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posX = ev.pageX; - posY = ev.pageY; - } - cal.hideShowCovered(); - var st = cal.element.style; - st.left = (posX - cal.xOffs) + "px"; - st.top = (posY - cal.yOffs) + "px"; - return Calendar.stopEvent(ev); -}; - -Calendar.calDragEnd = function (ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - cal.dragging = false; - with (Calendar) { - removeEvent(document, "mousemove", calDragIt); - removeEvent(document, "mouseover", stopEvent); - removeEvent(document, "mouseup", calDragEnd); - tableMouseUp(ev); - } - cal.hideShowCovered(); -}; - -Calendar.dayMouseDown = function(ev) { - var el = Calendar.getElement(ev); - if (el.disabled) { - return false; - } - var cal = el.calendar; - cal.activeDiv = el; - Calendar._C = cal; - if (el.navtype != 300) with (Calendar) { - addClass(el, "hilite active"); - addEvent(document, "mouseover", tableMouseOver); - addEvent(document, "mousemove", tableMouseOver); - addEvent(document, "mouseup", tableMouseUp); - } else if (cal.isPopup) { - cal._dragStart(ev); - } - if (el.navtype == -1 || el.navtype == 1) { - cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); - } else if (el.navtype == -2 || el.navtype == 2) { - cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); - } else { - cal.timeout = null; - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseDblClick = function(ev) { - Calendar.cellClick(Calendar.getElement(ev)); - if (Calendar.is_ie) { - document.selection.empty(); - } -}; - -Calendar.dayMouseOver = function(ev) { - var el = Calendar.getElement(ev); - if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { - return false; - } - if (el.ttip) { - if (el.ttip.substr(0, 1) == "_") { - var date = null; - with (el.calendar.date) { - date = new Date(getFullYear(), getMonth(), el.caldate); - } - el.ttip = date.print(el.calendar.ttDateFormat) + el.ttip.substr(1); - } - el.calendar.tooltips.firstChild.data = el.ttip; - } - if (el.navtype != 300) { - Calendar.addClass(el, "hilite"); - if (el.caldate) { - Calendar.addClass(el.parentNode, "rowhilite"); - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseOut = function(ev) { - with (Calendar) { - var el = getElement(ev); - if (isRelated(el, ev) || _C || el.disabled) { - return false; - } - removeClass(el, "hilite"); - if (el.caldate) { - removeClass(el.parentNode, "rowhilite"); - } - el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; - return stopEvent(ev); - } -}; - -/** - * A generic "click" handler :) handles all types of buttons defined in this - * calendar. - */ -Calendar.cellClick = function(el) { - var cal = el.calendar; - var closing = false; - var newdate = false; - var date = null; - if (typeof el.navtype == "undefined") { - Calendar.removeClass(cal.currentDateEl, "selected"); - Calendar.addClass(el, "selected"); - closing = (cal.currentDateEl == el); - if (!closing) { - cal.currentDateEl = el; - } - cal.date.setDate(el.caldate); - date = cal.date; - newdate = true; - // a date was clicked - cal.dateClicked = true; - } else { - if (el.navtype == 200) { - Calendar.removeClass(el, "hilite"); - cal.callCloseHandler(); - return; - } - date = (el.navtype == 0) ? new Date() : new Date(cal.date); - // unless "today" was clicked, we assume no date was clicked so - // the selected handler will know not to close the calenar when - // in single-click mode. - cal.dateClicked = (el.navtype == 0); - var year = date.getFullYear(); - var mon = date.getMonth(); - function setMonth(m) { - var day = date.getDate(); - var max = date.getMonthDays(m); - if (day > max) { - date.setDate(max); - } - date.setMonth(m); - }; - switch (el.navtype) { - case -2: - if (year > cal.minYear) { - date.setFullYear(year - 1); - } - break; - case -1: - if (mon > 0) { - setMonth(mon - 1); - } else if (year-- > cal.minYear) { - date.setFullYear(year); - setMonth(11); - } - break; - case 1: - if (mon < 11) { - setMonth(mon + 1); - } else if (year < cal.maxYear) { - date.setFullYear(year + 1); - setMonth(0); - } - break; - case 2: - if (year < cal.maxYear) { - date.setFullYear(year + 1); - } - break; - case 100: - cal.setMondayFirst(!cal.mondayFirst); - return; - case 0: - // TODAY will bring us here - if ((typeof cal.checkDisabled == "function") && cal.checkDisabled(date)) { - // remember, "date" was previously set to new - // Date() if TODAY was clicked; thus, it - // contains today date. - return false; - } - break; - } - if (!date.equalsTo(cal.date)) { - cal.setDate(date); - newdate = true; - } - } - if (newdate) { - cal.callHandler(); - } - if (closing) { - Calendar.removeClass(el, "hilite"); - cal.callCloseHandler(); - } -}; - -// END: CALENDAR STATIC FUNCTIONS - -// BEGIN: CALENDAR OBJECT FUNCTIONS - -/** - * This function creates the calendar inside the given parent. If _par is - * null than it creates a popup calendar inside the BODY element. If _par is - * an element, be it BODY, then it creates a non-popup calendar (still - * hidden). Some properties need to be set before calling this function. - */ -Calendar.prototype.create = function (_par) { - var parent = null; - if (! _par) { - // default parent is the document body, in which case we create - // a popup calendar. - parent = document.getElementsByTagName("body")[0]; - this.isPopup = true; - } else { - parent = _par; - this.isPopup = false; - } - this.date = this.dateStr ? new Date(this.dateStr) : new Date(); - - var table = Calendar.createElement("table"); - this.table = table; - table.cellSpacing = 0; - table.cellPadding = 0; - table.calendar = this; - Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown); - - var div = Calendar.createElement("div"); - this.element = div; - div.className = "calendar"; - if (this.isPopup) { - div.style.position = "absolute"; - div.style.display = "none"; - } - div.appendChild(table); - - var thead = Calendar.createElement("thead", table); - var cell = null; - var row = null; - - var cal = this; - var hh = function (text, cs, navtype) { - cell = Calendar.createElement("td", row); - cell.colSpan = cs; - cell.className = "button"; - Calendar._add_evs(cell); - cell.calendar = cal; - cell.navtype = navtype; - if (text.substr(0, 1) != "&") { - cell.appendChild(document.createTextNode(text)); - } - else { - // FIXME: dirty hack for entities - cell.innerHTML = text; - } - return cell; - }; - - row = Calendar.createElement("tr", thead); - var title_length = 6; - (this.isPopup) && --title_length; - (this.weekNumbers) && ++title_length; - - hh("-", 1, 100).ttip = Calendar._TT["TOGGLE"]; - this.title = hh("", title_length, 300); - this.title.className = "title"; - if (this.isPopup) { - this.title.ttip = Calendar._TT["DRAG_TO_MOVE"]; - this.title.style.cursor = "move"; - hh("×", 1, 200).ttip = Calendar._TT["CLOSE"]; - } - - row = Calendar.createElement("tr", thead); - row.className = "headrow"; - - this._nav_py = hh("«", 1, -2); - this._nav_py.ttip = Calendar._TT["PREV_YEAR"]; - - this._nav_pm = hh("‹", 1, -1); - this._nav_pm.ttip = Calendar._TT["PREV_MONTH"]; - - this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0); - this._nav_now.ttip = Calendar._TT["GO_TODAY"]; - - this._nav_nm = hh("›", 1, 1); - this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"]; - - this._nav_ny = hh("»", 1, 2); - this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"]; - - // day names - row = Calendar.createElement("tr", thead); - row.className = "daynames"; - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - cell.className = "name wn"; - cell.appendChild(document.createTextNode(Calendar._TT["WK"])); - } - for (var i = 7; i > 0; --i) { - cell = Calendar.createElement("td", row); - cell.appendChild(document.createTextNode("")); - if (!i) { - cell.navtype = 100; - cell.calendar = this; - Calendar._add_evs(cell); - } - } - this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild; - this._displayWeekdays(); - - var tbody = Calendar.createElement("tbody", table); - this.tbody = tbody; - - for (i = 6; i > 0; --i) { - row = Calendar.createElement("tr", tbody); - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - cell.appendChild(document.createTextNode("")); - } - for (var j = 7; j > 0; --j) { - cell = Calendar.createElement("td", row); - cell.appendChild(document.createTextNode("")); - cell.calendar = this; - Calendar._add_evs(cell); - } - } - - var tfoot = Calendar.createElement("tfoot", table); - - row = Calendar.createElement("tr", tfoot); - row.className = "footrow"; - - cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300); - cell.className = "ttip"; - if (this.isPopup) { - cell.ttip = Calendar._TT["DRAG_TO_MOVE"]; - cell.style.cursor = "move"; - } - this.tooltips = cell; - - div = Calendar.createElement("div", this.element); - this.monthsCombo = div; - div.className = "combo"; - for (i = 0; i < Calendar._MN.length; ++i) { - var mn = Calendar.createElement("div"); - mn.className = "label"; - mn.month = i; - mn.appendChild(document.createTextNode(Calendar._MN3[i])); - div.appendChild(mn); - } - - div = Calendar.createElement("div", this.element); - this.yearsCombo = div; - div.className = "combo"; - for (i = 12; i > 0; --i) { - var yr = Calendar.createElement("div"); - yr.className = "label"; - yr.appendChild(document.createTextNode("")); - div.appendChild(yr); - } - - this._init(this.mondayFirst, this.date); - parent.appendChild(this.element); -}; - -/** keyboard navigation, only for popup calendars */ -Calendar._keyEvent = function(ev) { - if (!window.calendar) { - return false; - } - (Calendar.is_ie) && (ev = window.event); - var cal = window.calendar; - var act = (Calendar.is_ie || ev.type == "keypress"); - if (ev.ctrlKey) { - switch (ev.keyCode) { - case 37: // KEY left - act && Calendar.cellClick(cal._nav_pm); - break; - case 38: // KEY up - act && Calendar.cellClick(cal._nav_py); - break; - case 39: // KEY right - act && Calendar.cellClick(cal._nav_nm); - break; - case 40: // KEY down - act && Calendar.cellClick(cal._nav_ny); - break; - default: - return false; - } - } else switch (ev.keyCode) { - case 32: // KEY space (now) - Calendar.cellClick(cal._nav_now); - break; - case 27: // KEY esc - act && cal.hide(); - break; - case 37: // KEY left - case 38: // KEY up - case 39: // KEY right - case 40: // KEY down - if (act) { - var date = cal.date.getDate() - 1; - var el = cal.currentDateEl; - var ne = null; - var prev = (ev.keyCode == 37) || (ev.keyCode == 38); - switch (ev.keyCode) { - case 37: // KEY left - (--date >= 0) && (ne = cal.ar_days[date]); - break; - case 38: // KEY up - date -= 7; - (date >= 0) && (ne = cal.ar_days[date]); - break; - case 39: // KEY right - (++date < cal.ar_days.length) && (ne = cal.ar_days[date]); - break; - case 40: // KEY down - date += 7; - (date < cal.ar_days.length) && (ne = cal.ar_days[date]); - break; - } - if (!ne) { - if (prev) { - Calendar.cellClick(cal._nav_pm); - } else { - Calendar.cellClick(cal._nav_nm); - } - date = (prev) ? cal.date.getMonthDays() : 1; - el = cal.currentDateEl; - ne = cal.ar_days[date - 1]; - } - Calendar.removeClass(el, "selected"); - Calendar.addClass(ne, "selected"); - cal.date.setDate(ne.caldate); - cal.callHandler(); - cal.currentDateEl = ne; - } - break; - case 13: // KEY enter - if (act) { - cal.callHandler(); - cal.hide(); - } - break; - default: - return false; - } - return Calendar.stopEvent(ev); -}; - -/** - * (RE)Initializes the calendar to the given date and style (if mondayFirst is - * true it makes Monday the first day of week, otherwise the weeks start on - * Sunday. - */ -Calendar.prototype._init = function (mondayFirst, date) { - var today = new Date(); - var year = date.getFullYear(); - if (year < this.minYear) { - year = this.minYear; - date.setFullYear(year); - } else if (year > this.maxYear) { - year = this.maxYear; - date.setFullYear(year); - } - this.mondayFirst = mondayFirst; - this.date = new Date(date); - var month = date.getMonth(); - var mday = date.getDate(); - var no_days = date.getMonthDays(); - date.setDate(1); - var wday = date.getDay(); - var MON = mondayFirst ? 1 : 0; - var SAT = mondayFirst ? 5 : 6; - var SUN = mondayFirst ? 6 : 0; - if (mondayFirst) { - wday = (wday > 0) ? (wday - 1) : 6; - } - var iday = 1; - var row = this.tbody.firstChild; - var MN = Calendar._MN3[month]; - var hasToday = ((today.getFullYear() == year) && (today.getMonth() == month)); - var todayDate = today.getDate(); - var week_number = date.getWeekNumber(); - var ar_days = new Array(); - for (var i = 0; i < 6; ++i) { - if (iday > no_days) { - row.className = "emptyrow"; - row = row.nextSibling; - continue; - } - var cell = row.firstChild; - if (this.weekNumbers) { - cell.className = "day wn"; - cell.firstChild.data = week_number; - cell = cell.nextSibling; - } - ++week_number; - row.className = "daysrow"; - for (var j = 0; j < 7; ++j) { - cell.className = "day"; - if ((!i && j < wday) || iday > no_days) { - // cell.className = "emptycell"; - cell.innerHTML = " "; - cell.disabled = true; - cell = cell.nextSibling; - continue; - } - cell.disabled = false; - cell.firstChild.data = iday; - if (typeof this.checkDisabled == "function") { - date.setDate(iday); - if (this.checkDisabled(date)) { - cell.className += " disabled"; - cell.disabled = true; - } - } - if (!cell.disabled) { - ar_days[ar_days.length] = cell; - cell.caldate = iday; - cell.ttip = "_"; - if (iday == mday) { - cell.className += " selected"; - this.currentDateEl = cell; - } - if (hasToday && (iday == todayDate)) { - cell.className += " today"; - cell.ttip += Calendar._TT["PART_TODAY"]; - } - if (wday == SAT || wday == SUN) { - cell.className += " weekend"; - } - } - ++iday; - ((++wday) ^ 7) || (wday = 0); - cell = cell.nextSibling; - } - row = row.nextSibling; - } - this.ar_days = ar_days; - this.title.firstChild.data = Calendar._MN[month] + ", " + year; - // PROFILE - // this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms"; -}; - -/** - * Calls _init function above for going to a certain date (but only if the - * date is different than the currently selected one). - */ -Calendar.prototype.setDate = function (date) { - if (!date.equalsTo(this.date)) { - this._init(this.mondayFirst, date); - } -}; - -/** - * Refreshes the calendar. Useful if the "disabledHandler" function is - * dynamic, meaning that the list of disabled date can change at runtime. - * Just * call this function if you think that the list of disabled dates - * should * change. - */ -Calendar.prototype.refresh = function () { - this._init(this.mondayFirst, this.date); -}; - -/** Modifies the "mondayFirst" parameter (EU/US style). */ -Calendar.prototype.setMondayFirst = function (mondayFirst) { - this._init(mondayFirst, this.date); - this._displayWeekdays(); -}; - -/** - * Allows customization of what dates are enabled. The "unaryFunction" - * parameter must be a function object that receives the date (as a JS Date - * object) and returns a boolean value. If the returned value is true then - * the passed date will be marked as disabled. - */ -Calendar.prototype.setDisabledHandler = function (unaryFunction) { - this.checkDisabled = unaryFunction; -}; - -/** Customization of allowed year range for the calendar. */ -Calendar.prototype.setRange = function (a, z) { - this.minYear = a; - this.maxYear = z; -}; - -/** Calls the first user handler (selectedHandler). */ -Calendar.prototype.callHandler = function () { - if (this.onSelected) { - this.onSelected(this, this.date.print(this.dateFormat)); - } -}; - -/** Calls the second user handler (closeHandler). */ -Calendar.prototype.callCloseHandler = function () { - if (this.onClose) { - this.onClose(this); - } - this.hideShowCovered(); -}; - -/** Removes the calendar object from the DOM tree and destroys it. */ -Calendar.prototype.destroy = function () { - var el = this.element.parentNode; - el.removeChild(this.element); - Calendar._C = null; -}; - -/** - * Moves the calendar element to a different section in the DOM tree (changes - * its parent). - */ -Calendar.prototype.reparent = function (new_parent) { - var el = this.element; - el.parentNode.removeChild(el); - new_parent.appendChild(el); -}; - -// This gets called when the user presses a mouse button anywhere in the -// document, if the calendar is shown. If the click was outside the open -// calendar this function closes it. -Calendar._checkCalendar = function(ev) { - if (!window.calendar) { - return false; - } - var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev); - for (; el != null && el != calendar.element; el = el.parentNode); - if (el == null) { - // calls closeHandler which should hide the calendar. - window.calendar.callCloseHandler(); - return Calendar.stopEvent(ev); - } -}; - -/** Shows the calendar. */ -Calendar.prototype.show = function () { - var rows = this.table.getElementsByTagName("tr"); - for (var i = rows.length; i > 0;) { - var row = rows[--i]; - Calendar.removeClass(row, "rowhilite"); - var cells = row.getElementsByTagName("td"); - for (var j = cells.length; j > 0;) { - var cell = cells[--j]; - Calendar.removeClass(cell, "hilite"); - Calendar.removeClass(cell, "active"); - } - } - this.element.style.display = "block"; - this.hidden = false; - if (this.isPopup) { - window.calendar = this; - Calendar.addEvent(document, "keydown", Calendar._keyEvent); - Calendar.addEvent(document, "keypress", Calendar._keyEvent); - Calendar.addEvent(document, "mousedown", Calendar._checkCalendar); - } - this.hideShowCovered(); -}; - -/** - * Hides the calendar. Also removes any "hilite" from the class of any TD - * element. - */ -Calendar.prototype.hide = function () { - if (this.isPopup) { - Calendar.removeEvent(document, "keydown", Calendar._keyEvent); - Calendar.removeEvent(document, "keypress", Calendar._keyEvent); - Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar); - } - this.element.style.display = "none"; - this.hidden = true; - this.hideShowCovered(); -}; - -/** - * Shows the calendar at a given absolute position (beware that, depending on - * the calendar element style -- position property -- this might be relative - * to the parent's containing rectangle). - */ -Calendar.prototype.showAt = function (x, y) { - var s = this.element.style; - s.left = x + "px"; - s.top = y + "px"; - this.show(); -}; - -/** Shows the calendar near a given element. */ -Calendar.prototype.showAtElement = function (el, opts) { - var p = Calendar.getAbsolutePos(el); - if (!opts || typeof opts != "string") { - this.showAt(p.x, p.y + el.offsetHeight); - return true; - } - this.show(); - var w = this.element.offsetWidth; - var h = this.element.offsetHeight; - this.hide(); - var valign = opts.substr(0, 1); - var halign = "l"; - if (opts.length > 1) { - halign = opts.substr(1, 1); - } - // vertical alignment - switch (valign) { - case "T": p.y -= h; break; - case "B": p.y += el.offsetHeight; break; - case "C": p.y += (el.offsetHeight - h) / 2; break; - case "t": p.y += el.offsetHeight - h; break; - case "b": break; // already there - } - // horizontal alignment - switch (halign) { - case "L": p.x -= w; break; - case "R": p.x += el.offsetWidth; break; - case "C": p.x += (el.offsetWidth - w) / 2; break; - case "r": p.x += el.offsetWidth - w; break; - case "l": break; // already there - } - this.showAt(p.x, p.y); -}; - -/** Customizes the date format. */ -Calendar.prototype.setDateFormat = function (str) { - this.dateFormat = str; -}; - -/** Customizes the tooltip date format. */ -Calendar.prototype.setTtDateFormat = function (str) { - this.ttDateFormat = str; -}; - -/** - * Tries to identify the date represented in a string. If successful it also - * calls this.setDate which moves the calendar to the given date. - */ -Calendar.prototype.parseDate = function (str, fmt) { - var y = 0; - var m = -1; - var d = 0; - var a = str.split(/\W+/); - if (!fmt) { - fmt = this.dateFormat; - } - var b = fmt.split(/\W+/); - var i = 0, j = 0; - for (i = 0; i < a.length; ++i) { - if (b[i] == "D" || b[i] == "DD") { - continue; - } - if (b[i] == "d" || b[i] == "dd") { - d = parseInt(a[i], 10); - } - if (b[i] == "m" || b[i] == "mm") { - m = parseInt(a[i], 10) - 1; - } - if ((b[i] == "y") || (b[i] == "yy")) { - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - } - if (b[i] == "M" || b[i] == "MM") { - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } - } - } - } - if (y != 0 && m != -1 && d != 0) { - this.setDate(new Date(y, m, d)); - return; - } - y = 0; m = -1; d = 0; - for (i = 0; i < a.length; ++i) { - if (a[i].search(/[a-zA-Z]+/) != -1) { - var t = -1; - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } - } - if (t != -1) { - if (m != -1) { - d = m+1; - } - m = t; - } - } else if (parseInt(a[i], 10) <= 12 && m == -1) { - m = a[i]-1; - } else if (parseInt(a[i], 10) > 31 && y == 0) { - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - } else if (d == 0) { - d = a[i]; - } - } - if (y == 0) { - var today = new Date(); - y = today.getFullYear(); - } - if (m != -1 && d != 0) { - this.setDate(new Date(y, m, d)); - } -}; - -Calendar.prototype.hideShowCovered = function () { - function getStyleProp(obj, style){ - var value = obj.style[style]; - if (!value) { - if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C - value = document.defaultView. - getComputedStyle(obj, "").getPropertyValue(style); - } else if (obj.currentStyle) { // IE - value = obj.currentStyle[style]; - } else { - value = obj.style[style]; - } - } - return value; - }; - - var tags = new Array("applet", "iframe", "select"); - var el = this.element; - - var p = Calendar.getAbsolutePos(el); - var EX1 = p.x; - var EX2 = el.offsetWidth + EX1; - var EY1 = p.y; - var EY2 = el.offsetHeight + EY1; - - for (var k = tags.length; k > 0; ) { - var ar = document.getElementsByTagName(tags[--k]); - var cc = null; - - for (var i = ar.length; i > 0;) { - cc = ar[--i]; - - p = Calendar.getAbsolutePos(cc); - var CX1 = p.x; - var CX2 = cc.offsetWidth + CX1; - var CY1 = p.y; - var CY2 = cc.offsetHeight + CY1; - - if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getStyleProp(cc, "visibility"); - } - cc.style.visibility = cc.__msh_save_visibility; - } else { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getStyleProp(cc, "visibility"); - } - cc.style.visibility = "hidden"; - } - } - } -}; - -/** Internal function; it displays the bar with the names of the weekday. */ -Calendar.prototype._displayWeekdays = function () { - var MON = this.mondayFirst ? 0 : 1; - var SUN = this.mondayFirst ? 6 : 0; - var SAT = this.mondayFirst ? 5 : 6; - var cell = this.firstdayname; - for (var i = 0; i < 7; ++i) { - cell.className = "day name"; - if (!i) { - cell.ttip = this.mondayFirst ? Calendar._TT["SUN_FIRST"] : Calendar._TT["MON_FIRST"]; - cell.navtype = 100; - cell.calendar = this; - Calendar._add_evs(cell); - } - if (i == SUN || i == SAT) { - Calendar.addClass(cell, "weekend"); - } - cell.firstChild.data = Calendar._DN3[i + 1 - MON]; - cell = cell.nextSibling; - } -}; - -/** Internal function. Hides all combo boxes that might be displayed. */ -Calendar.prototype._hideCombos = function () { - this.monthsCombo.style.display = "none"; - this.yearsCombo.style.display = "none"; -}; - -/** Internal function. Starts dragging the element. */ -Calendar.prototype._dragStart = function (ev) { - if (this.dragging) { - return; - } - this.dragging = true; - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posY = ev.clientY + window.scrollY; - posX = ev.clientX + window.scrollX; - } - var st = this.element.style; - this.xOffs = posX - parseInt(st.left); - this.yOffs = posY - parseInt(st.top); - with (Calendar) { - addEvent(document, "mousemove", calDragIt); - addEvent(document, "mouseover", stopEvent); - addEvent(document, "mouseup", calDragEnd); - } -}; - -// BEGIN: DATE OBJECT PATCHES - -/** Adds the number of days array to the Date object. */ -Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); - -/** Constants used for time computations */ -Date.SECOND = 1000 /* milliseconds */; -Date.MINUTE = 60 * Date.SECOND; -Date.HOUR = 60 * Date.MINUTE; -Date.DAY = 24 * Date.HOUR; -Date.WEEK = 7 * Date.DAY; - -/** Returns the number of days in the current month */ -Date.prototype.getMonthDays = function(month) { - var year = this.getFullYear(); - if (typeof month == "undefined") { - month = this.getMonth(); - } - if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) { - return 29; - } else { - return Date._MD[month]; - } -}; - -/** Returns the number of the week. The algorithm was "stolen" from PPK's - * website, hope it's correct :) http://www.xs4all.nl/~ppk/js/week.html */ -Date.prototype.getWeekNumber = function() { - var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); - var then = new Date(this.getFullYear(), 0, 1, 0, 0, 0); - var time = now - then; - var day = then.getDay(); - (day > 3) && (day -= 4) || (day += 3); - return Math.round(((time / Date.DAY) + day) / 7); -}; - -/** Checks dates equality (ignores time) */ -Date.prototype.equalsTo = function(date) { - return ((this.getFullYear() == date.getFullYear()) && - (this.getMonth() == date.getMonth()) && - (this.getDate() == date.getDate())); -}; - -/** Prints the date in a string according to the given format. */ -Date.prototype.print = function (frm) { - var str = new String(frm); - var m = this.getMonth(); - var d = this.getDate(); - var y = this.getFullYear(); - var wn = this.getWeekNumber(); - var w = this.getDay(); - var s = new Array(); - s["d"] = d; - s["dd"] = (d < 10) ? ("0" + d) : d; - s["m"] = 1+m; - s["mm"] = (m < 9) ? ("0" + (1+m)) : (1+m); - s["y"] = y; - s["yy"] = new String(y).substr(2, 2); - s["w"] = wn; - s["ww"] = (wn < 10) ? ("0" + wn) : wn; - with (Calendar) { - s["D"] = _DN3[w]; - s["DD"] = _DN[w]; - s["M"] = _MN3[m]; - s["MM"] = _MN[m]; - } - var re = /(.*)(\W|^)(d|dd|m|mm|y|yy|MM|M|DD|D|w|ww)(\W|$)(.*)/; - while (re.exec(str) != null) { - str = RegExp.$1 + RegExp.$2 + s[RegExp.$3] + RegExp.$4 + RegExp.$5; - } - return str; -}; - -// END: DATE OBJECT PATCHES - -// global object that remembers the calendar -window.calendar = null; diff --git a/phpgwapi/inc/jscalendar/calendar_stripped.js b/phpgwapi/inc/jscalendar/calendar_stripped.js deleted file mode 100644 index 38b9b9aad7..0000000000 --- a/phpgwapi/inc/jscalendar/calendar_stripped.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo - * --------------------------------------------------------------------------- - * - * The DHTML Calendar, version 0.9.3 "It's still alive & keeps rocking" - * - * Details and latest version at: - * http://students.infoiasi.ro/~mishoo/site/calendar.epl - * - * Feel free to use this script under the terms of the GNU Lesser General - * Public License, as long as you do not remove or alter this notice. - */ -Calendar=function(mondayFirst,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.checkDisabled=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.mondayFirst=mondayFirst;this.dateStr=dateStr;this.ar_days=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(!Calendar._DN3){var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,3);}Calendar._DN3=ar;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,3);}Calendar._MN3=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar._DN3=null;Calendar._MN3=null;Calendar.getAbsolutePos=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=Calendar.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.currentTarget;}};Calendar.getTargetElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.target;}};Calendar.stopEvent=function(ev){if(Calendar.is_ie){window.event.cancelBubble=true;window.event.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;mc.style.left=cd.offsetLeft+"px";mc.style.top=(cd.offsetTop+cd.offsetHeight)+"px";mc.style.display="block";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.firstChild.data=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?2:-2;}if(show){yc.style.left=cd.offsetLeft+"px";yc.style.top=(cd.offsetTop+cd.offsetHeight)+"px";yc.style.display="block";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseover",stopEvent);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){addClass(el,"hilite active");addEvent(document,"mouseover",tableMouseOver);addEvent(document,"mousemove",tableMouseOver);addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev));if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){var date=null;with(el.calendar.date){date=new Date(getFullYear(),getMonth(),el.caldate);}el.ttip=date.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.firstChild.data=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled){return false;}removeClass(el,"hilite");if(el.caldate){removeClass(el.parentNode,"rowhilite");}el.calendar.tooltips.firstChild.data=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}cal.date.setDate(el.caldate);date=cal.date;newdate=true;cal.dateClicked=true;}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=(el.navtype==0)?new Date():new Date(cal.date);cal.dateClicked=(el.navtype==0);var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year0;--i){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));cell.calendar=this;Calendar._add_evs(cell);}}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i0;--i){var yr=Calendar.createElement("div");yr.className="label";yr.appendChild(document.createTextNode(""));div.appendChild(yr);}this._init(this.mondayFirst,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){if(!window.calendar){return false;}(Calendar.is_ie)&&(ev=window.event);var cal=window.calendar;var act=(Calendar.is_ie||ev.type=="keypress");if(ev.ctrlKey){switch(ev.keyCode){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(ev.keyCode){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.hide();break;case 37:case 38:case 39:case 40:if(act){var date=cal.date.getDate()-1;var el=cal.currentDateEl;var ne=null;var prev=(ev.keyCode==37)||(ev.keyCode==38);switch(ev.keyCode){case 37:(--date>=0)&&(ne=cal.ar_days[date]);break;case 38:date-=7;(date>=0)&&(ne=cal.ar_days[date]);break;case 39:(++datethis.maxYear){year=this.maxYear;date.setFullYear(year);}this.mondayFirst=mondayFirst;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var wday=date.getDay();var MON=mondayFirst?1:0;var SAT=mondayFirst?5:6;var SUN=mondayFirst?6:0;if(mondayFirst){wday=(wday>0)?(wday-1):6;}var iday=1;var row=this.tbody.firstChild;var MN=Calendar._MN3[month];var hasToday=((today.getFullYear()==year)&&(today.getMonth()==month));var todayDate=today.getDate();var week_number=date.getWeekNumber();var ar_days=new Array();for(var i=0;i<6;++i){if(iday>no_days){row.className="emptyrow";row=row.nextSibling;continue;}var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.firstChild.data=week_number;cell=cell.nextSibling;}++week_number;row.className="daysrow";for(var j=0;j<7;++j){cell.className="day";if((!i&&jno_days){cell.innerHTML=" ";cell.disabled=true;cell=cell.nextSibling;continue;}cell.disabled=false;cell.firstChild.data=iday;if(typeof this.checkDisabled=="function"){date.setDate(iday);if(this.checkDisabled(date)){cell.className+=" disabled";cell.disabled=true;}}if(!cell.disabled){ar_days[ar_days.length]=cell;cell.caldate=iday;cell.ttip="_";if(iday==mday){cell.className+=" selected";this.currentDateEl=cell;}if(hasToday&&(iday==todayDate)){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(wday==SAT||wday==SUN){cell.className+=" weekend";}}++iday;((++wday)^ 7)||(wday=0);cell=cell.nextSibling;}row=row.nextSibling;}this.ar_days=ar_days;this.title.firstChild.data=Calendar._MN[month]+", "+year;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.mondayFirst,date);}};Calendar.prototype.refresh=function(){this._init(this.mondayFirst,this.date);};Calendar.prototype.setMondayFirst=function(mondayFirst){this._init(mondayFirst,this.date);this._displayWeekdays();};Calendar.prototype.setDisabledHandler=function(unaryFunction){this.checkDisabled=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){if(!window.calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window.calendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window.calendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}this.show();var w=this.element.offsetWidth;var h=this.element.offsetHeight;this.hide();var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "r":p.x+=el.offsetWidth-w;break;case "l":break;}this.showAt(p.x,p.y);};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){var y=0;var m=-1;var d=0;var a=str.split(/\W+/);if(!fmt){fmt=this.dateFormat;}var b=fmt.split(/\W+/);var i=0,j=0;for(i=0;i29)?1900:2000);}if(b[i]=="M"||b[i]=="MM"){for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}}}if(y!=0&&m!=-1&&d!=0){this.setDate(new Date(y,m,d));return;}y=0;m=-1;d=0;for(i=0;i31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0){var today=new Date();y=today.getFullYear();}if(m!=-1&&d!=0){this.setDate(new Date(y,m,d));}};Calendar.prototype.hideShowCovered=function(){function getStyleProp(obj,style){var value=obj.style[style];if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){value=document.defaultView.getComputedStyle(obj,"").getPropertyValue(style);}else if(obj.currentStyle){value=obj.currentStyle[style];}else{value=obj.style[style];}}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2EY2)||(CY23)&&(day-=4)||(day+=3);return Math.round(((time/Date.DAY)+day)/7);};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate()));};Date.prototype.print=function(frm){var str=new String(frm);var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s=new Array();s["d"]=d;s["dd"]=(d<10)?("0"+d):d;s["m"]=1+m;s["mm"]=(m<9)?("0"+(1+m)):(1+m);s["y"]=y;s["yy"]=new String(y).substr(2,2);s["w"]=wn;s["ww"]=(wn<10)?("0"+wn):wn;with(Calendar){s["D"]=_DN3[w];s["DD"]=_DN[w];s["M"]=_MN3[m];s["MM"]=_MN[m];}var re=/(.*)(\W|^)(d|dd|m|mm|y|yy|MM|M|DD|D|w|ww)(\W|$)(.*)/;while(re.exec(str)!=null){str=RegExp.$1+RegExp.$2+s[RegExp.$3]+RegExp.$4+RegExp.$5;}return str;};window.calendar=null; \ No newline at end of file diff --git a/phpgwapi/inc/jscalendar/doc/html/reference-Z-S.css b/phpgwapi/inc/jscalendar/doc/html/reference-Z-S.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/phpgwapi/inc/jscalendar/doc/html/reference.css b/phpgwapi/inc/jscalendar/doc/html/reference.css deleted file mode 100644 index 42e9283536..0000000000 --- a/phpgwapi/inc/jscalendar/doc/html/reference.css +++ /dev/null @@ -1,34 +0,0 @@ -html { margin: 0px; padding: 0px; background-color: #08f; color: #444; font-family: georgia,serif; } -body { margin: 2em 8%; background-color: #fff; padding: 1em; border: 2px ridge #048; } - -a:link, a:visited { text-decoration: none; color: #00f; } -a:hover { color: #f00; text-decoration: underline; } -a:active { color: #f84; } - -h1, h2, h3, h4, h5, h6 { font-family: tahoma,verdana,sans-serif; } - -h2, h3 { font-weight: normal; } - -h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { text-decoration: none; } - -h1 { font-size: 170%; border: 2px ridge #048; letter-spacing: 2px; color: #000; margin-left: -2em; margin-right: -2em; -background-color: #fff; padding: 2px 1em; background-color: #def; } -h2 { font-size: 140%; color: #222; } -h3 { font-size: 120%; color: #444; } - -h1.title { font-size: 300%; font-family: georgia,serif; font-weight: normal; color: #846; letter-spacing: -1px; -border: none; -padding: none; -background-color: #fff; -border-bottom: 3px double #624; padding-bottom: 2px; margin-left: 8%; margin-right: 8%; } - -.colophon { padding-top: 2em; color: #999; font-size: 90%; font-family: georgia,"times new roman",serif; } -.colophon a:link, .colophon a:visited { color: #755; } -.colophon a:hover { color: #422; text-decoration: underline; } - -.footnote { font-size: 90%; font-style: italic; font-family: georgia,"times new roman",serif; margin: 0px 3em; } -.footnote sup { font-size: 120%; padding: 0px 0.3em; position: relative; top: -0.2em; } - -.small { font-size: 90%; } - -.verbatim { background-color: #eee; padding: 0.2em 1em; border: 1px solid #aaa; } diff --git a/phpgwapi/inc/jscalendar/doc/html/reference.html b/phpgwapi/inc/jscalendar/doc/html/reference.html deleted file mode 100644 index 944ef99ed1..0000000000 --- a/phpgwapi/inc/jscalendar/doc/html/reference.html +++ /dev/null @@ -1,1124 +0,0 @@ - - - - - -DHTML Calendar Widget - - - - - - -

-

-

-

-

-

-

-

-

-

-

- - - -

-

- - - -

-

- - -

-

- -

-



DHTML Calendar Widget

-

-
-Mihai Bazon, <mishoo@infoiasi.ro>

July 9, 2003

-

-

-calendar version: 0.9.3
-document version: 0.1 -
-

-
-

-

-

-
-
- -“Though a program be but three lines of code, someday it will have to be -maintained.”
-— The Tao of Programming -
- -
- -

Contents

-

-    1  Overview
-        1.1  How does this thing work?
-        1.2  Project files
-        1.3  License
-

-

-    2  Quick startup
-        2.1  Installing a popup calendar
-        2.2  Installing a flat calendar
-        2.3  Calendar.setup in detail
-

-

-    3  The Calendar object overview
-        3.1  Creating a calendar
-        3.2  Order does matter ;-)
-        3.3  Caching the object
-        3.4  Callback functions
-

-

-    4  The Calendar object API reference
-        4.1  Calendar constructor
-        4.2  Useful member variables (properties)
-        4.3  Public methods
-            4.3.1  Calendar.create
-            4.3.2  Calendar.callHandler
-            4.3.3  Calendar.callCloseHandler
-            4.3.4  Calendar.hide
-            4.3.5  Calendar.setDateFormat
-            4.3.6  Calendar.setTtDateFormat
-            4.3.7  Calendar.setDisabledHandler
-            4.3.8  Calendar.show
-            4.3.9  Calendar.showAt
-            4.3.10  Calendar.showAtElement
-            4.3.11  Calendar.setDate
-            4.3.12  Calendar.setMondayFirst
-            4.3.13  Calendar.parseDate
-            4.3.14  Calendar.setRange
-

-

-    5  Side effects
-

-

-    6  Sponsors
-

-

-

-

-

- -

1  Overview

The DHTML Calendar widget1 -is an (HTML) user interface element that gives end-users a friendly way to -input dates. It works in a web browser. The first versions only provided -support for popup calendars, while starting with version 0.9 it also supports -“flat” display. A “flat” calendar is a calendar that stays visible in the -page all the time. In this mode it could be very useful for “blog” pages and -other pages that require the calendar to be always present.

-

-The calendar is compatible with most popular browsers nowadays. While it’s -created using web standards and it should generally work with any compliant -browser, the following browsers were found to work: Mozilla (the main -development platform), Netscape 6.0 or better, all other Gecko-based browsers, -Internet Explorer 5.0 or better for Windows2, Opera 73.

-

-You can find the latest info and version at the calendar homepage:

-

-

- -

-

- -

1.1  How does this thing work?

DHTML is not “another kind of HTML”. It’s merely a naming convention. DHTML -refers to the combination of HTML, CSS, JavaScript and DOM. DOM (Document -Object Model) is a set of interfaces that glues the other three together. In -other words, DOM allows dynamic modification of an HTML page through a program. -JavaScript is our programming language, since that’s what browsers like. CSS -is a way to make it look good ;-).

-

-Using DOM calls, the program dynamically creates a <table> element -that contains a calendar for the given date and then inserts it in the document -body. Then it shows this table at a specified position. Usually the position -is related to some element in which the date needs to be displayed/entered, -such as an input field.

-

-By assigning a certain CSS class to the table we can control the look of the -calendar through an external CSS file; therefore, in order to change the -colors, backgrounds, rollover effects and other stuff, you can only change a -CSS file—modification of the program itself is not necessary.

-

-

- -

1.2  Project files

Here’s a description of the project files, excluding documentation and example -files.

-

-

-

    -

    -
  • the main program file (calendar.js). This defines all the logic -behind the calendar widget.

    -

    -

    -
  • the CSS files (calendar-*.css). Loading one of them is -necessary in order to see the calendar as intended.

    -

    -

    -
  • the language definition files (lang/calendar-*.js). They are -plain JavaScript files that contain all texts that are displayed by the -calendar. Loading one of them is necessary.

    -

    -

    -
  • helper functions for quick setup of the calendar -(calendar-setup.js). You can do fine without it, but starting with -version 0.9.3 this is the recommended way to setup a calendar.

    -

    -

    -

-

-

- -

1.3  License

-
- -© Mihai Bazon, 2002 – 2003, <mishoo@infoiasi.ro>
-http://students.infoiasi.ro/~mishoo -
-

-The calendar is released under the -GNU Lesser General Public -License. This basically means that you are allowed to use it for anything you -like, except selling it for profit or claiming it’s authorship. You can read -the entire license text here.

-

-

- -

2  Quick startup

-

-Installing the calendar used to be quite a task until version 0.9.3. Starting -with 0.9.3 I have included the file calendar-setup.js whose goal is to -assist you to setup a popup or flat calendar within minutes.

-

-First you have to include the needed scripts and style-sheet. Make sure you do -this in your document’s <head> section, also make sure you put the -correct paths to the scripts.

-

-

-
<style type="text/css">@import url(calendar-win2k-1.css)</style>
-<script type="text/javascript" src="calendar.js"></script>
-<script type="text/javascript" src="lang/calendar-en.js"></script>
-<script type="text/javascript" src="calendar-setup.js"></script>
-

-

-

- -

2.1  Installing a popup calendar

-

-Now suppose you have the following HTML:

-

-

-
<form ...>
-  <input type="text" id="data" name="data" />
-  <button id="trigger">...</button>
-</form>
-

-

-You want the button to popup a calendar widget when clicked? Just -insert the following code immediately after the HTML form:

-

-

-
<script type="text/javascript">
-  Calendar.setup(
-    {
-      inputField  : "data",      // ID of the input field
-      ifFormat    : "M d, y",    // the date format
-      button      : "trigger"    // ID of the button
-    }
-  );
-</script>
-

-

-The Calendar.setup function, defined in calendar-setup.js -takes care of “patching” the button to display a calendar when clicked. The -calendar is by default in single-click mode and linked with the given input -field, so that when the end-user selects a date it will update the input field -with the date in the given format and close the calendar. If you are a -long-term user of the calendar you probably remember that for doing this you -needed to write a couple functions and add an “onclick” handler for the -button by hand.

-

-By looking at the example above we can see that the function -Calendar.setup receives only one parameter: a JavaScript object. -Further, that object can have lots of properties that tell to the setup -function how would we like to have the calendar. For instance, if we would -like a calendar that closes at double-click instead of single-click we would -also include the following: singleClick:false.

-

-For a list of all supported parameters please see the section -2.3.

-

-

- -

2.2  Installing a flat calendar

-

-Here’s how to configure a flat calendar, using the same Calendar.setup -function. First, you should have an empty element with an ID. This element -will act as a container for the calendar. It can be any block-level element, -such as DIV, TABLE, etc. We will use a DIV in this example.

-

-

-
<div id="calendar-container"></div>
-

-

-Then there is the JavaScript code that sets up the calendar into the -“calendar-container” DIV. The code can occur anywhere in HTML -after the DIV element.

-

-

-
<script type="text/javascript">
-  function dateChanged(calendar) {
-    // Beware that this function is called even if the end-user only
-    // changed the month/year.  In order to determine if a date was
-    // clicked you can use the dateClicked property of the calendar:
-    if (calendar.dateClicked) {
-      // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
-      var y = calendar.date.getFullYear();
-      var m = calendar.date.getMonth();     // integer, 0..11
-      var d = calendar.date.getDate();      // integer, 1..31
-      // redirect...
-      window.location = "/" + y + "/" + m + "/" + d + "/index.php";
-    }
-  };
-
-  Calendar.setup(
-    {
-      flat         : "calendar-container", // ID of the parent element
-      flatCallback : dateChanged           // our callback function
-    }
-  );
-</script>
-

-

-

- -

2.3  Calendar.setup in detail

-

-Following there is the complete list of properties interpreted by -Calendar.setup. All of them have default values, so you can pass only those -which you would like to customize. Anyway, you must pass at least one -of inputField, displayArea or button, for a popup -calendar, or flat for a flat calendar. Otherwise you will get a -warning message saying that there’s nothing to setup.

-

-

- - - - - - - - - - - - - - -
property type description default -
inputField -string The ID of your input field. -null -
displayArea -string This is the ID of a <span>, <div>, or any other element that you would like to use to display the current date. This is generally useful only if the input field is hidden, as an area to display the date. -null -
button -string The ID of the calendar “trigger”. This is an element (ordinarily a button or an image) that will dispatch a certain event (usually “click”) to the function that creates and displays the calendar. -null -
eventName -string The name of the event that will trigger the calendar. The name should be without the “on” prefix, such as “click” instead of “onclick”. Virtually all users will want to let this have the default value (“click”). Anyway, it could be useful if, say, you want the calendar to appear when the input field is focused and have no trigger button (in this case use “focus” as the event name). -“click” -
ifFormat -string The format string that will be used to enter the date in the input field. This format will be honored even if the input field is hidden. -“y/mm/dd” -
daFormat -string Format of the date displayed in the displayArea (if specified). -“y/mm/dd” -
singleClick -boolean Wether the calendar is in “single-click mode” or “double-click mode”. If true (the default) the calendar will be created in single-click mode. -true -
disableFunc -function A function that receives a JS Date object. It should return -true if that date has to be disabled, false otherwise. -null -
mondayFirst -boolean If “true” then the calendar will display with Monday being the first day of week. -false -
weekNumbers -boolean If “true” then the calendar will display week numbers. -true -
align -string Alignment of the calendar, relative to the reference element. The -reference element is dynamically chosen like this: if a displayArea is -specified then it will be the reference element. Otherwise, the input field -is the reference element. For the meaning of the alignment characters -please section 4.3.10. -“Bl” -
range -array An array having exactly 2 elements, integers. (!) The first [0] element is the minimum year that is available, and the second [1] element is the maximum year that the calendar will allow. -[1900, 2999] -
flat -string If you want a flat calendar, pass the ID of the parent object in -this property. If not, pass null here (or nothing at all as -null is the default value. -null -
flatCallback -function You should provide this function if the calendar is flat. It -will be called when the date in the calendar is changed with a reference to -the calendar object. See section 2.2 for an example -of how to setup a flat calendar. -null - -
- -

-

- -

3  The Calendar object overview

-

-Basically you should be able to setup the calendar with the function presented -in the last section. However, if for some reason Calendar.setup -doesn’t provide all the functionality that you need and you want to tweak into -the process of creating and configuring the calendar “by hand”, then this -section is the way to go.

-

-The file calendar.js implements the functionality of the calendar. -All (well, almost all) functions and variables are embedded in the JavaScript -object “Calendar”.

-

-You can instantiate a Calendar object by calling the constructor, like -this: var cal = new Calendar(...). We will discuss the parameters -later. After creating the object, the variable cal will contain a -reference to it. You can use this reference to access further options of the -calendar, for instance:

-

-

-
cal.weekNumbers = false; // do not display week numbers
-cal.setDateFormat("y.mm.dd"); // set this format: 2003.12.31
-cal.setDisabledHandler(function(date) {
-  // verify date and return true if it has to be disabled
-  if (date.getFullYear() == 2004) {
-    // disable all dates from 2004
-    return false;
-  }
-});
-

-

-etc. Prior to version -0.9.3 this was the only way to configure it. The Calendar.setup -function, documented in section 2, basically does the same -things (actually more) in order to setup the calendar, based on the parameters -that you provided.

-

-

- -

3.1  Creating a calendar

The calendar is created by following some steps (even the function -Calendar.setup, described in section 2, does the -same):

-

-

-

    -

    -
  1. Instantiate a Calendar object. Details about this in -section 4.1.

    -

    -

    -
  2. optional   Set the weekNumbers property to false if you don’t want -the calendar to display week numbers. This step must take place before -calling Calendar.create.

    -

    -

    -
  3. optional   Set the range of years available for selection (see section -4.3.14). The default range is [1970..2050].

    -

    -

    -
  4. optional   Set the disabledHandler property. You should pass -here a function that receives a JavaScript Date object and returns -true if the given date should be disabled, false otherwise (details in -section 4.3.7).

    -

    -

    -
  5. optional   Set a date format. Your handler function, passed to the -calendar constructor, will be called when a date is selected with a reference -to the calendar and a date string in this format.

    -

    -

    -
  6. Create the HTML elements related to the calendar. This step -practically puts the calendar in your HTML page. You simply call -Calendar.create(). You can give an optional parameter if you wanna -create a flat calendar (details in section 4.3.1).

    -

    -

    -
  7. optional   Initialize the calendar to a certain date, for instance from -the input field.

    -

    -

    -
  8. Show the calendar (details in section 4.3.8).

    -

    -

    -

-

-

- -

3.2  Order does matter ;-)

As you could see in the previous section, there are more steps to be followed -in order to setup the calendar. This happens because there are two different -things that need to be accomplished: first there is the JavaScript object, that -is created with new Calendar(...). Secondly there are the HTML -elements that actually lets you see and manipulate the calendar.

-

-

-[ Those that did UI4 programming, no matter in what -language and on what platform, may be familiar with this concept. First there -is the object in memory that lets you manipulate the UI element, and secondly -there is the UI element (known as “control”, “window”, “widget”, etc.), -also in memory but you don’t usually access it directly. ] -

-By instantiating the calendar we create the JavaScript object. It lets us -configure some properties and it also knows how to create the UI element (the -HTML elements actually) that will eventually be what the end-user sees on -screen. Creation of the HTML element is accomplished by the function -Calendar.create. It knows how to create popup or flat calendars. -This function is described in section 4.3.1.

-

-Some properties need to be set prior to creating the HTML elements, because -otherwise they wouldn’t have any effect. Such a property is -weekNumbers—it has the default value “true”, and if you don’t -want the calendar to display the week numbers you have to set it to false. If, -however, you do that after calling Calendar.create the calendar -would still display the week numbers, because the HTML elements are already -created (including the <td>-s in the <table> element that -should contain the week numbers). For this reason the order of the steps above -is important.

-

-Another example is when you want to show the calendar. The “create” function -does create the HTML elements, but they are initially hidden (have the style -“display: none”) unless the calendar is a flat calendar that should be always -visible in the page. Obviously, the Calendar.show function should be -called after calling Calendar.create.

-

-

- -

3.3  Caching the object

Suppose the end-user has popped up a calendar and selects a date. The calendar -then closes. What really happens now?

-

-There are two approaches. The first (used in very old versions of the -calendar) was to drop completely the Calendar object and when the end-user pops -up the calendar again to create another one. This approach is bad for more -reasons:

-

-

-

    -

    -
  • creating the JavaScript object and HTML elements is time-consuming

    -

    -

    -
  • we may loose some end-user preferences (i.e. he might prefer to have -Monday for the first day of week and probably already clicked it the first time -when the calendar was opened, but now he has to do it again)

    -

    -

    -

-

-The second approach, implemented by the Calendar.setup function, is to -cache the JavaScript object. It does this by checking the global variable -window.calendar and if it is not null it assumes it is the created -Calendar object. When the end-user closes the calendar, our code will only -call “hide” on it, therefore keeping the JavaScript object and the -HTML elements in place.

-

-

- -

3.4  Callback functions

You might rightfully wonder how is the calendar related to the input field? -Who tells it that it has to update that input field when a date is -selected, or that it has to jump to that URL when a date is clicked in -flat mode?

-

-All this magic is done through callback functions. The calendar doesn’t know -anything about the existence of an input field, nor does it know where to -redirect the browser when a date is clicked in flat mode. It just calls your -callback when a particular event is happening, and you’re responsible to handle -it from there. For a general purpose library I think this is the best model of -making a truly reusable thing.

-

-The calendar supports the following user callbacks:

-

-

-

    -

    -
  • onSelect   — this gets called when the end-user changes the date in the -calendar. Documented in section 4.1.

    -

    -

    -
  • onClose   — this gets called when the calendar should close. It’s -user’s responsibility to close the calendar. Details in section -4.1.

    -

    -

    -
  • disabledHandler   — this function gets called for any day in a month, -just before displaying the month. It is called with a JavaScript Date -object and should return true if that date should be disabled -or false otherwise. Details in section 4.3.7.

    -

    -

    -

-

-

- -

4  The Calendar object API reference

-

-

- -

4.1  Calendar constructor

-

-Synopsis:

-

-

-
var calendar = Calendar(mondayFirst, date, onSelect, onClose);
-

-

-Parameters are as follows:

-

-

-

    -

    -
  • mondayFirst   — boolean, if it’s true the calendar will have -Monday as first day of week, if false weeks start on Sunday.

    -

    -

    -
  • date   — a JavaScript Date object or null. If null -is passed then the calendar will default to today date. Otherwise it will -initialize on the given date.

    -

    -

    -
  • onSelect   — your callback for the “onChange” event. See above.

    -

    -

    -
  • onClose   — your callback for the “onClose” event. See above.

    -

    -

    -

-

-

- -

The onSelect event

-

-Here is a typical implementation of this function:

-

-

-
function onSelect(calendar, date) {
-  var input_field = document.getElementById("date");
-  input_field.value = date;
-};
-

-

-date is in the format selected with calendar.setDateFormat -(see section 4.3.5). This code simply updates the -input field. If you want the calendar to be in single-click mode then you -should also close the calendar after you updated the input field, so we come to -the following version:

-

-

-
function onSelect(calendar, date) {
-  var input_field = document.getElementById("date");
-  input_field.value = date;
-  if (calendar.dateClicked) {
-    calendar.callCloseHandler(); // this calls "onClose" (see above)
-  }
-};
-

-

-Note that we checked the member variable dateClicked and -only hide the calendar if it’s true. If this variable is false it -means that no date was actually selected, but the user only changed the -month/year using the navigation buttons or the menus. We don’t want to hide -the calendar in that case.

-

-

- -

The onClose event

-

-This event is triggered when the calendar should close. It should hide or -destroy the calendar object—the calendar itself just triggers the event, but -it won’t close itself.

-

-A typical implementation of this function is the following:

-

-

-
function onClose(calendar) {
-  calendar.hide();
-  // or calendar.destroy();
-};
-

-

-

- -

4.2  Useful member variables (properties)

-

-After creating the Calendar object you can access the following properties:

-

-

-

    -

    -
  • date — is a JavaScript Date object. It will always -reflect the date shown in the calendar (yes, even if the calendar is hidden).

    -

    -

    -
  • isPopup — if this is true then the current Calendar object is -a popup calendar. Otherwise (false) we have a flat calendar. This variable is -set from Calendar.create and has no meaning before this function was -called.

    -

    -

    -
  • dateClicked — particularly useful in the onSelect -handler, this variable tells us if a date was really clicked. That’s because -the onSelect handler is called even if the end-user only changed the -month/year but did not select a date. We don’t want to close the calendar in -that case.

    -

    -

    -
  • weekNumbers — if true (default) then the calendar -displays week numbers. If you don’t want week numbers you have to set this -variable to false before calling Calendar.create.

    -

    -

    -
  • mondayFirst — if true then the calendar uses Monday -as first day of week, otherwise Sunday. This variable is set from constructor, -but you still have a chance to modify it before calling -Calendar.create.

    -

    -

    -

-

-There are lots of other member variables, but one should access them only -through member functions so I won’t document them here.

-

-

- -

4.3  Public methods

- -

4.3.1  Calendar.create

-

-This function creates the afferent HTML elements that are needed to display the -calendar. You should call it after setting the calendar properties. Synopsis: -

-
calendar.create(); // creates a popup calendar
-  // -- or --
-calendar.create(document.getElementById(parent_id)); // makes a flat calendar
-

-

-It can create a popup calendar or a flat calendar. If the “parent” argument -is present (it should be a reference—not ID—to an HTML element) then -a flat calendar is created and it is inserted in the given element.

-

-At any moment, given a reference to a calendar object, we can inspect if it’s a -popup or a flat calendar by checking the boolean member variable -isPopup:

-

-

-
if (calendar.isPopup) {
-   // this is a popup calendar
-} else {
-   // this is a flat calendar
-}
-

-

-

- -

4.3.2  Calendar.callHandler

-

-This function calls the first user callback (the -onSelect handler) with the required parameters.

-

-

- -

4.3.3  Calendar.callCloseHandler

-

-This function calls the second user callback (the -onClose handler). It’s useful when you want to have a -“single-click” calendar—just call this in your onSelect handler, -if a date was clicked.

-

-

- -

4.3.4  Calendar.hide

-

-Call this function to hide the calendar. The calendar object and HTML elements -will not be destroyed, thus you can later call one of the show -functions on the same element.

-

-

- -

4.3.5  Calendar.setDateFormat

-

-This function configures the format in which the calendar reports the date to -your “onSelect” handler. Call it like this:

-

-

-
calendar.setDateFormat("y/mm/dd");
-

-

-As you can see, it receives only one parameter, the required format. The magic -characters are the following:

-

-

- - - - - - - - - - - - - - -
d the date ( ex: 1 .. 31 )
dd the date, zero padded ( ex: 01 .. 31 )
m month as a number ( ex: 1 .. 12 )
mm month, zero padded ( ex: 01 .. 12 )
y 4 digit year ( ex: 1979 )
yy 2 digit year, yy - 1900 ( ex: 79 ) (USING THIS IS NOT RECOMMENDED)
w the number of the week in the year (1 or 2 digits)
ww the number of the week, zero padded (2 digits)
D short weekday name ( ex: Sun, Wed, Fri )
DD long weekday name ( ex: Sunday, Wednesday, Friday )
M short month name ( ex: Mar, Jan, Oct )
MM long month name ( ex: March, January, October )

-WARNING!    The format specifiers are likely to change. -The current is a complete mess, in that that, for instance, you can’t have a -format like this: “ymmdd”—you have to separate them through non-word -characters, like for example “y-mm-dd”. In next versions of calendar the -format will probably use a “%” prefix, like in strftime from -ANSI-C, so the format above will be possible to write like this: -“%y%mm%dd”.

-

-

- -

4.3.6  Calendar.setTtDateFormat

-

-Has the same prototype as Calendar.setDateFormat, but refers to the -format of the date displayed in the “status bar” when the mouse is over some -date.

-

-

- -

4.3.7  Calendar.setDisabledHandler

-

-This function allows you to specify a callback function that checks if a -certain date must be disabled by the calendar. You are responsible to write -the callback function. Synopsis:

-

-

-
function disallowDate(date) {
-  // date is a JS Date object
-  if (  date.getFullYear() == 2003 &&
-        date.getMonth()    == 6 /* July, it's zero-based */ &&
-        date.getDate()     == 5  ) {
-    return true; // disable July 5 2003
-  }
-  return false; // enable other dates
-};
-
-calendar.setDisabledHandler(disallowDate);
-

-

-If you change this function in “real-time”, meaning, without creating a new -calendar, then you have to call calendar.refresh() to make it -redisplay the month and take into account the new disabledHandler. -Calendar.setup does this, so you have no such trouble with it.

-

-Note that disallowDate should be very fast, as it is called for each -date in the month. Thus, it gets called, say, 30 times before displaying the -calendar, and 30 times when the month is changed. Tests I’ve done so far show -that it’s still good, but in the future I might switch it to a different design -(for instance, to call it once per month and to return an array of dates that -must be disabled).

-

-

- -

4.3.8  Calendar.show

-

-Call this function do show the calendar. It basically sets the CSS “display” -property to “block”. It doesn’t modify the calendar position.

-

-This function only makes sense when the calendar is in popup mode.

-

-

- -

4.3.9  Calendar.showAt

-

-Call this to show the calendar at a certain (x, y) position. Prototype:

-

-

-
calendar.showAt(x, y);
-

-

-The parameters are absolute coordinates relative to the top left -corner of the page, thus they are page coordinates not screen -coordinates.

-

-After setting the given coordinates it calls Calendar.show. This function only -makes sense when the calendar is in popup mode.

-

-

- -

4.3.10  Calendar.showAtElement

-

-This function is useful if you want to display the calendar near some element. -You call it like this:

-

-

-
calendar.showAtElement(element, align);
-

-

-where element is a reference to your element (for instance it can be the input -field that displays the date) and align is an optional parameter, of type string, -containing one or two characters. For instance, if you pass "Br" as -align, the calendar will appear below the element and with its right -margin continuing the element’s right margin.

-

-As stated above, align may contain one or two characters. The first character -dictates the vertical alignment, relative to the element, and the second -character dictates the horizontal alignment. If the second character is -missing it will be assumed "l" (the left margin of the calendar will -be at the same horizontal position as the left margin of the element).

-

-The characters given for the align parameters are case sensitive. This -function only makes sense when the calendar is in popup mode. After computing -the position it uses Calendar.showAt to display the calendar there.

-

-

- -

Vertical alignment

The first character in “align” can take one of the following values:

-

-

-

    -

    -
  • T — completely above the reference element (bottom margin of -the calendar aligned to the top margin of the element).

    -

    -

    -
  • t — above the element but may overlap it (bottom margin of the calendar aligned to -the bottom margin of the element).

    -

    -

    -
  • c — the calendar displays vertically centered to the reference -element. It might overlap it (that depends on the horizontal alignment).

    -

    -

    -
  • b — below the element but may overlap it (top margin of the calendar aligned to -the top margin of the element).

    -

    -

    -
  • B — completely below the element (top margin of the calendar -aligned to the bottom margin of the element).

    -

    -

    -

-

-

- -

Horizontal alignment

The second character in “align” can take one of the following values:

-

-

-

    -

    -
  • L — completely to the left of the reference element (right -margin of the calendar aligned to the left margin of the element).

    -

    -

    -
  • l — to the left of the element but may overlap it (left margin -of the calendar aligned to the left margin of the element).

    -

    -

    -
  • c — horizontally centered to the element. Might overlap it, -depending on the vertical alignment.

    -

    -

    -
  • r — to the right of the element but may overlap it (right -margin of the calendar aligned to the right margin of the element).

    -

    -

    -
  • R — completely to the right of the element (left margin of the -calendar aligned to the right margin of the element).

    -

    -

    -

-

-

- -

Default values

If the “align” parameter is missing the calendar will choose -“Bl”. This resembles the behavior of older versions (prior to -0.9.3) which did not support custom alignment.

-

-

- -

4.3.11  Calendar.setDate

-

-Receives a JavaScript Date object. Sets the given date in the -calendar. If the calendar is visible the new date is displayed immediately.

-

-

-
calendar.setDate(new Date()); // go today
-

-

-

- -

4.3.12  Calendar.setMondayFirst

-

-Changes the first day of week. If the parameter is true then Monday -will be the first day of week, otherwise Sunday.

-

-

-
calendar.setMondayFirst(false); // use Sunday
-

-

-

- -

4.3.13  Calendar.parseDate

-

-Use this function to parse a date given as string and to move the calendar to -that date.

-

-The algorithm tries to parse the date according to the format that was -previously set with Calendar.setDateFormat; if that fails, it still -tries to get some valid date out of it (it doesn’t read your thoughts, though).

-

-

-
calendar.parseDate("2003/07/06");
-

-

-

- -

4.3.14  Calendar.setRange

-

-Sets the range of years that are allowed in the calendar. Synopsis:

-

-

-
calendar.setRange(1970, 2050);
-

-

-

- -

5  Side effects

The calendar code was intentionally embedded in an object to make it have as -less as possible side effects. However, there are some—not harmful, after -all. Here is a list of side effects; you can count they already happened after -calendar.js was loaded.

-

-

-

    -

    -
  1. The global variable window.calendar will be set to null. This -variable is used by the calendar code, especially when doing drag & drop for -moving the calendar. In the future I might get rid of it, but for now it -didn’t harm anyone.

    -

    -

    -
  2. The JavaScript Date object is modified. We add some properties -and functions that are very useful to our calendar. It made more sense to add -them directly to the Date object than to the calendar itself. -Complete list:

    -

    -

    -

      -

      -
    1. Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); -

      -
    2. Date.SECOND = 1000 /* milliseconds */; -

      -
    3. Date.MINUTE = 60 * Date.SECOND; -

      -
    4. Date.HOUR = 60 * Date.MINUTE; -

      -
    5. Date.DAY = 24 * Date.HOUR; -

      -
    6. Date.WEEK = 7 * Date.DAY;

      -

      -

      -
    7. Date.prototype.getMonthDays(month) — returns the number of days -of the given month, or of the current date object if no month was given.

      -

      -

      -
    8. Date.prototype.getWeekNumber() — returns the week number of the -date in the current object.

      -

      -

      -
    9. Date.prototype.equalsTo(other_date) — compare the current date -object with other_date and returns true if the dates are -equal. It ignores time.

      -

      -

      -
    10. Date.prototype.print(format) — returns a string with the -current date object represented in the given format. It implements the format -specified in section 4.3.5.

      -

      -

      -

    -

    -

    -

-

-

- -

6  Sponsors

The following people either sponsored, donated money to the project or bought -developer licenses (listed in reverse chronological order). Your name could be here -too! If you wish to sponsor the project (for instance request a feature and -pay me for implementing it) or donate some money please -please contact me at mishoo@infoiasi.ro.

-

-

-

-

-

-
- -Thank you!
-— mishoo@infoiasi.ro -
-

-

-

-

1 -by the term “widget” I understand a single element of user interface. -But that’s in Linux world. For those that did lots of Windows -programming the term “control” might be more familiar -

-

2 people report that the calendar does -not work with IE5/Mac. I don’t have access to a Macintosh, -therefore—sorry—I can’t fix it.

-

3 under Opera 7 the calendar still lacks some functionality, such as -keyboard navigation; also Opera doesn’t seem to allow disabling text -selection when one drags the mouse on the page; despite all that, the -calendar is still highly functional under Opera 7 and looks as good as -in other supported browsers.

-

4 user interface

-
-
-Last modified: Mon, July 7, 2003, 5:18 pm
-HTML conversion by TeX2page 4r8f
-
- - diff --git a/phpgwapi/inc/jscalendar/doc/reference.pdf b/phpgwapi/inc/jscalendar/doc/reference.pdf deleted file mode 100644 index 544db53ded..0000000000 Binary files a/phpgwapi/inc/jscalendar/doc/reference.pdf and /dev/null differ diff --git a/phpgwapi/inc/jscalendar/img.gif b/phpgwapi/inc/jscalendar/img.gif deleted file mode 100644 index e15a4a4445..0000000000 Binary files a/phpgwapi/inc/jscalendar/img.gif and /dev/null differ diff --git a/phpgwapi/inc/jscalendar/lang/calendar-br.js b/phpgwapi/inc/jscalendar/lang/calendar-br.js deleted file mode 100644 index d7db4b46ef..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-br.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Domingo", - "Segunda", - "Tera", - "Quarta", - "Quinta", - "Sexta", - "Sbado", - "Domingo"); -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Maro", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Altera primeiro dia da semana"; -Calendar._TT["PREV_YEAR"] = "Ano anterior(hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Ms anterior (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Hoje"; -Calendar._TT["NEXT_MONTH"] = "Ms seguinte (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "ano seguinte (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Seleciona uma data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrasta calendrio"; -Calendar._TT["PART_TODAY"] = " (hoje)"; -Calendar._TT["MON_FIRST"] = "Inicia na segunda-feira"; -Calendar._TT["SUN_FIRST"] = "Inicia no domingo"; -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, dd de MM de y"; - -Calendar._TT["WK"] = "sem"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-ca.js b/phpgwapi/inc/jscalendar/lang/calendar-ca.js deleted file mode 100644 index 3498d7659d..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-ca.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Diumenge", - "Dilluns", - "Dimarts", - "Dimecres", - "Dijous", - "Divendres", - "Dissabte", - "Diumenge"); -Calendar._MN = new Array -("Gener", - "Febrer", - "Mar", - "Abril", - "Maig", - "Juny", - "Juliol", - "Agost", - "Setembre", - "Octubre", - "Novembre", - "Desembre"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Canvia el primer dia de la setmana"; -Calendar._TT["PREV_YEAR"] = "Any anterior (mantenir per a menu)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (mantenir per a menu)"; -Calendar._TT["GO_TODAY"] = "Anar a avui"; -Calendar._TT["NEXT_MONTH"] = "Mes segent (mantenir per a menu)"; -Calendar._TT["NEXT_YEAR"] = "Any segent (mantenir per a menu)"; -Calendar._TT["SEL_DATE"] = "Seleccionar data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per a moure"; -Calendar._TT["PART_TODAY"] = " (avui)"; -Calendar._TT["MON_FIRST"] = "Mostrar dilluns primer"; -Calendar._TT["SUN_FIRST"] = "Mostrar diumenge primer"; -Calendar._TT["CLOSE"] = "Tancar"; -Calendar._TT["TODAY"] = "Avui"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "sem"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-cs-win.js b/phpgwapi/inc/jscalendar/lang/calendar-cs-win.js deleted file mode 100644 index b34213f50a..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-cs-win.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Nedle','Pondl','ter','Steda','tvrtek','Ptek','Sobota','Nedle'); -Calendar._DN3 = new Array('Ne','Po','t','St','t','P','So','Ne'); -Calendar._MN = new Array('Leden','nor','Bezen','Duben','Kvten','erven','ervenec','Srpen','Z','jen','Listopad','Prosinec'); -Calendar._MN3 = new Array('Led','no','Be','Dub','Kv','rv','vc','Srp','Z','j','Lis','Pro'); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Zmna prvnho dne v tdnu"; -Calendar._TT["PREV_YEAR"] = "Pedchoz rok (pidr pro menu)"; -Calendar._TT["PREV_MONTH"] = "Pedchoz msc (pidr pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnen datum"; -Calendar._TT["NEXT_MONTH"] = "Dal msc (pidr pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Dal rok (pidr pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chy a thni, pro pesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Uka jako prvn Pondl"; -Calendar._TT["SUN_FIRST"] = "Uka jako prvn Nedli"; -Calendar._TT["CLOSE"] = "Zavt"; -Calendar._TT["TODAY"] = "Dnes"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, 5.MM y"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-da.js b/phpgwapi/inc/jscalendar/lang/calendar-da.js deleted file mode 100644 index f0fff7e748..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-da.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Sndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lrdag", - "Sndag"); -Calendar._MN = new Array -("January", - "Februar", - "Marts", - "April", - "Maj", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Skift frste ugedag"; -Calendar._TT["PREV_YEAR"] = "t r tilbage (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "n mned tilbage (hold for menu)"; -Calendar._TT["GO_TODAY"] = "G til i dag"; -Calendar._TT["NEXT_MONTH"] = "n mned frem (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "t r frem (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Vlg dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Trk vinduet"; -Calendar._TT["PART_TODAY"] = " (i dag)"; -Calendar._TT["MON_FIRST"] = "Vis mandag frst"; -Calendar._TT["SUN_FIRST"] = "Vis sndag frst"; -Calendar._TT["CLOSE"] = "Luk vinduet"; -Calendar._TT["TODAY"] = "I dag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D d. M, y"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-du.js b/phpgwapi/inc/jscalendar/lang/calendar-du.js deleted file mode 100644 index 2200448051..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-du.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle startdag van de week"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)"; -Calendar._TT["GO_TODAY"] = "Naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "Vandaag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-el.js b/phpgwapi/inc/jscalendar/lang/calendar-el.js deleted file mode 100644 index eeeb40b9bd..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-el.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = " "; -Calendar._TT["PREV_YEAR"] = ". ( )"; -Calendar._TT["PREV_MONTH"] = ". ( )"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = " "; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = " "; -Calendar._TT["SUN_FIRST"] = " "; -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-en.js b/phpgwapi/inc/jscalendar/lang/calendar-en.js deleted file mode 100644 index bc075bb74b..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-en.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday"); -Calendar._MN = new Array -("January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle first day of week"; -Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Go Today"; -Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Select date"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; -Calendar._TT["PART_TODAY"] = " (today)"; -Calendar._TT["MON_FIRST"] = "Display Monday first"; -Calendar._TT["SUN_FIRST"] = "Display Sunday first"; -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-es.js b/phpgwapi/inc/jscalendar/lang/calendar-es.js deleted file mode 100644 index 1aafa4b8ca..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-es.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Mircoles", - "Jueves", - "Viernes", - "Sbado", - "Domingo"); -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Cambia el primer da de la semana"; -Calendar._TT["PREV_YEAR"] = "Ao anterior (mantener para menu)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menu)"; -Calendar._TT["GO_TODAY"] = "Ir a hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menu)"; -Calendar._TT["NEXT_YEAR"] = "Ao siguiente (mantener para menu)"; -Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; -Calendar._TT["PART_TODAY"] = " (hoy)"; -Calendar._TT["MON_FIRST"] = "Mostrar lunes primero"; -Calendar._TT["SUN_FIRST"] = "Mostrar domingo primero"; -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "sem"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-fr.js b/phpgwapi/inc/jscalendar/lang/calendar-fr.js deleted file mode 100644 index aa15d50435..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-fr.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche"); -Calendar._MN = new Array -("Janvier", - "Fvrier", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Aot", - "Septembre", - "Octobre", - "Novembre", - "Dcembre"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Changer le premier jour de la semaine"; -Calendar._TT["PREV_YEAR"] = "Anne prc. (maintenir pour menu)"; -Calendar._TT["PREV_MONTH"] = "Mois prc. (maintenir pour menu)"; -Calendar._TT["GO_TODAY"] = "Atteindre date du jour"; -Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; -Calendar._TT["NEXT_YEAR"] = "Anne suiv. (maintenir pour menu)"; -Calendar._TT["SEL_DATE"] = "Choisir une date"; -Calendar._TT["DRAG_TO_MOVE"] = "Dplacer"; -Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; -Calendar._TT["MON_FIRST"] = "Commencer par lundi"; -Calendar._TT["SUN_FIRST"] = "Commencer par dimanche"; -Calendar._TT["CLOSE"] = "Fermer"; -Calendar._TT["TODAY"] = "Aujourd'hui"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-hr-utf8.js b/phpgwapi/inc/jscalendar/lang/calendar-hr-utf8.js deleted file mode 100644 index baf01b179c..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-hr-utf8.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Croatian language file for the DHTML Calendar version 0.9.2 -* Author Krunoslav Zubrinic , June 2003. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ -Calendar._DN = new Array -("Nedjelja", - "Ponedjeljak", - "Utorak", - "Srijeda", - "Četvrtak", - "Petak", - "Subota", - "Nedjelja"); -Calendar._MN = new Array -("Siječanj", - "Veljača", - "Ožujak", - "Travanj", - "Svibanj", - "Lipanj", - "Srpanj", - "Kolovoz", - "Rujan", - "Listopad", - "Studeni", - "Prosinac"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; -Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; -Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; -Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; -Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; -Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; -Calendar._TT["SEL_DATE"] = "Izaberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; -Calendar._TT["PART_TODAY"] = " (today)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; -Calendar._TT["CLOSE"] = "Zatvori"; -Calendar._TT["TODAY"] = "Danas"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y"; - -Calendar._TT["WK"] = "Tje"; \ No newline at end of file diff --git a/phpgwapi/inc/jscalendar/lang/calendar-hr.js b/phpgwapi/inc/jscalendar/lang/calendar-hr.js deleted file mode 100644 index be9a021bed..0000000000 Binary files a/phpgwapi/inc/jscalendar/lang/calendar-hr.js and /dev/null differ diff --git a/phpgwapi/inc/jscalendar/lang/calendar-hu.js b/phpgwapi/inc/jscalendar/lang/calendar-hu.js deleted file mode 100644 index b4fa8378e6..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-hu.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Vasrnap", - "Htf", - "Kedd", - "Szerda", - "Cstrtk", - "Pntek", - "Szombat", - "Vasrnap"); -Calendar._MN = new Array -("janur", - "februr", - "mrcius", - "prilis", - "mjus", - "jnius", - "jlius", - "augusztus", - "szeptember", - "oktber", - "november", - "december"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle first day of week"; -Calendar._TT["PREV_YEAR"] = "Elz v (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Elz hnap (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Mai napra ugrs"; -Calendar._TT["NEXT_MONTH"] = "Kv. hnap (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Kv. v (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Vlasszon dtumot"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; -Calendar._TT["PART_TODAY"] = " (ma)"; -Calendar._TT["MON_FIRST"] = "Htf legyen a ht els napja"; -Calendar._TT["SUN_FIRST"] = "Vasrnap legyen a ht els napja"; -Calendar._TT["CLOSE"] = "Bezr"; -Calendar._TT["TODAY"] = "Ma"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "M d, D"; - -Calendar._TT["WK"] = "ht"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-it.js b/phpgwapi/inc/jscalendar/lang/calendar-it.js deleted file mode 100644 index 05a37cd0be..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-it.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Domenica", - "Luned", - "Marted", - "Mercoled", - "Gioved", - "Venerd", - "Sabato", - "Domenica"); -Calendar._MN = new Array -("Gennaio", - "Febbraio", - "Marzo", - "Aprile", - "Maggio", - "Giugno", - "Luglio", - "Agosto", - "Settembre", - "Ottobre", - "Novembre", - "Dicembre"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Modifica il primo giorno della settimana"; -Calendar._TT["PREV_YEAR"] = "Anno prec. (tieni premuto per menu)"; -Calendar._TT["PREV_MONTH"] = "Mese prec. (tieni premuto per menu)"; -Calendar._TT["GO_TODAY"] = "Vai a oggi"; -Calendar._TT["NEXT_MONTH"] = "Mese succ. (tieni premuto per menu)"; -Calendar._TT["NEXT_YEAR"] = "Anno succ. (tieni premuto per menu)"; -Calendar._TT["SEL_DATE"] = "Seleziona data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostare"; -Calendar._TT["PART_TODAY"] = " (oggi)"; -Calendar._TT["MON_FIRST"] = "Parti da luned"; -Calendar._TT["SUN_FIRST"] = "Parti da domenica"; -Calendar._TT["CLOSE"] = "Chiudi"; -Calendar._TT["TODAY"] = "Oggi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-nl.js b/phpgwapi/inc/jscalendar/lang/calendar-nl.js deleted file mode 100644 index 2ddc68be40..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-nl.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; -Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "Vandaag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, d MM"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-no.js b/phpgwapi/inc/jscalendar/lang/calendar-no.js deleted file mode 100644 index 3325e34a4f..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-no.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Sndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lrdag", - "Sndag"); -Calendar._MN = new Array -("Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Skift frste ukedag"; -Calendar._TT["PREV_YEAR"] = "Et r tilbake (hold for meny)"; -Calendar._TT["PREV_MONTH"] = "En mned tilbake (hold for meny)"; -Calendar._TT["GO_TODAY"] = "G til i dag"; -Calendar._TT["NEXT_MONTH"] = "En mned fram (hold for meny)"; -Calendar._TT["NEXT_YEAR"] = "Et r fram (hold for meny)"; -Calendar._TT["SEL_DATE"] = "Velg dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Dra vinduet"; -Calendar._TT["PART_TODAY"] = " (i dag)"; -Calendar._TT["MON_FIRST"] = "Vis mandag frst"; -Calendar._TT["SUN_FIRST"] = "Vis sndag frst"; -Calendar._TT["CLOSE"] = "Lukk vinduet"; -Calendar._TT["TODAY"] = "I dag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D d. M, y"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-pl.js b/phpgwapi/inc/jscalendar/lang/calendar-pl.js deleted file mode 100644 index c1ef76929c..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-pl.js +++ /dev/null @@ -1,46 +0,0 @@ -// Polish| dariush pietrzak, eyck@ghost.anime.pl -// ** I18N -Calendar._DN = new Array -("Niedziela", - "Poniedziaek", - "Wtorek", - "roda", - "Czwartek", - "Pitek", - "Sobota", - "Niedziela"); -Calendar._MN = new Array -("Stycze", - "Luty", - "Marzec", - "Kwiecie", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpie", - "Wrzesie", - "Padziernik", - "Listopad", - "Grudzie"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Zmie pierwszy dzie tygodnia"; -Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprzedni miesic (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Id do dzisiaj"; -Calendar._TT["NEXT_MONTH"] = "Nastpny miesic (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Nastpny rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz dat"; -Calendar._TT["DRAG_TO_MOVE"] = "Przecignij by przesun"; -Calendar._TT["PART_TODAY"] = " (dzisiaj)"; -Calendar._TT["MON_FIRST"] = "Wywietl poniedziaek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Wywietl niedziel jako pierwsz"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dzisiaj"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-pt.js b/phpgwapi/inc/jscalendar/lang/calendar-pt.js deleted file mode 100644 index 1184dfa6d6..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-pt.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Domingo", - "Segunda", - "Tera", - "Quarta", - "Quinta", - "Sexta", - "Sbado", - "Domingo"); -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Maro", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Trocar o primeiro dia da semana"; -Calendar._TT["PREV_YEAR"] = "Ano Anterior (mantenha para menu)"; -Calendar._TT["PREV_MONTH"] = "Ms Anterior (mantenha para menu)"; -Calendar._TT["GO_TODAY"] = "Ir para hoje"; -Calendar._TT["NEXT_MONTH"] = "Prximo Ms (mantenha para menu)"; -Calendar._TT["NEXT_YEAR"] = "Prximo Ano (mantenha para menu)"; -Calendar._TT["SEL_DATE"] = "Escolha Data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; -Calendar._TT["MON_FIRST"] = "Mostrar Segunda primeiro"; -Calendar._TT["SUN_FIRST"] = "Mostrar Domingo primeiro"; -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "a-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "sm"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-ro.js b/phpgwapi/inc/jscalendar/lang/calendar-ro.js deleted file mode 100644 index e125fa9a96..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-ro.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Duminic", - "Luni", - "Mari", - "Miercuri", - "Joi", - "Vineri", - "Smbt", - "Duminic"); -Calendar._MN = new Array -("Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Schimb prima zi din sptmn"; -Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; -Calendar._TT["PREV_MONTH"] = "Luna precedent (lung pt menu)"; -Calendar._TT["GO_TODAY"] = "Data de azi"; -Calendar._TT["NEXT_MONTH"] = "Luna urmtoare (lung pt menu)"; -Calendar._TT["NEXT_YEAR"] = "Anul urmtor (lung pt menu)"; -Calendar._TT["SEL_DATE"] = "Selecteaz data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mica"; -Calendar._TT["PART_TODAY"] = " (astzi)"; -Calendar._TT["MON_FIRST"] = "Prima zi -> Luni"; -Calendar._TT["SUN_FIRST"] = "Prima zi -> Duminic"; -Calendar._TT["CLOSE"] = "nchide"; -Calendar._TT["TODAY"] = "Astzi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-ru.js b/phpgwapi/inc/jscalendar/lang/calendar-ru.js deleted file mode 100644 index 459cec5792..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-ru.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = " (/)"; -Calendar._TT["PREV_YEAR"] = ". ( )"; -Calendar._TT["PREV_MONTH"] = ". ( )"; -Calendar._TT["GO_TODAY"] = " "; -Calendar._TT["NEXT_MONTH"] = ". ( )"; -Calendar._TT["NEXT_YEAR"] = ". ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = ""; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = " "; -Calendar._TT["SUN_FIRST"] = " "; -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = ""; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-sp.js b/phpgwapi/inc/jscalendar/lang/calendar-sp.js deleted file mode 100644 index 14a356d372..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-sp.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Miercoles", - "Jueves", - "Viernes", - "Sabado", - "Domingo"); -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Augosto", - "Septiembre", - "Octubrer", - "Noviembre", - "Diciembre"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Primer dia de la semana"; -Calendar._TT["PREV_YEAR"] = "Ao anterior (Presione para menu)"; -Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)"; -Calendar._TT["GO_TODAY"] = "Ir a Hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)"; -Calendar._TT["NEXT_YEAR"] = "Ao Siguiente (Presione para menu)"; -Calendar._TT["SEL_DATE"] = "Seleccione fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva"; -Calendar._TT["PART_TODAY"] = " (Hoy)"; -Calendar._TT["MON_FIRST"] = "Lunes Primero"; -Calendar._TT["SUN_FIRST"] = "Domingo Primero"; -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "Smn"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-sw.js b/phpgwapi/inc/jscalendar/lang/calendar-sw.js deleted file mode 100644 index cdd31e8d80..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-sw.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Sndag", - "Mndag", - "Tisdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lrdag", - "Sndag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Mars", - "April", - "Maj", - "Juni", - "Juli", - "Augusti", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Skifta frsta veckodag"; -Calendar._TT["PREV_YEAR"] = "Frra ret (tryck fr meny)"; -Calendar._TT["PREV_MONTH"] = "Frra mnaden (tryck fr meny)"; -Calendar._TT["GO_TODAY"] = "G till dagens datum"; -Calendar._TT["NEXT_MONTH"] = "Nsta mnad (tryck fr meny)"; -Calendar._TT["NEXT_YEAR"] = "Nsta r (tryck fr meny)"; -Calendar._TT["SEL_DATE"] = "Vlj dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Flytta fnstret"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Visa Mndag frst"; -Calendar._TT["SUN_FIRST"] = "Visa Sndag frst"; -Calendar._TT["CLOSE"] = "Stng fnstret"; -Calendar._TT["TODAY"] = "Idag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, d MM y"; - -Calendar._TT["WK"] = "wk"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-tr.js b/phpgwapi/inc/jscalendar/lang/calendar-tr.js deleted file mode 100644 index f2c906c46c..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-tr.js +++ /dev/null @@ -1,58 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////// -// Turkish Translation by Nuri AKMAN -// Location: Ankara/TURKEY -// e-mail : nuriakman@hotmail.com -// Date : April, 9 2003 -// -// Note: if Turkish Characters does not shown on you screen -// please include falowing line your html code: -// -// -// -////////////////////////////////////////////////////////////////////////////////////////////// - -// ** I18N -Calendar._DN = new Array -("Pazar", - "Pazartesi", - "Sal", - "aramba", - "Perembe", - "Cuma", - "Cumartesi", - "Pazar"); -Calendar._MN = new Array -("Ocak", - "ubat", - "Mart", - "Nisan", - "Mays", - "Haziran", - "Temmuz", - "Austos", - "Eyll", - "Ekim", - "Kasm", - "Aralk"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Haftann ilk gnn kaydr"; -Calendar._TT["PREV_YEAR"] = "nceki Yl (Men iin basl tutunuz)"; -Calendar._TT["PREV_MONTH"] = "nceki Ay (Men iin basl tutunuz)"; -Calendar._TT["GO_TODAY"] = "Bugn'e git"; -Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Men iin basl tutunuz)"; -Calendar._TT["NEXT_YEAR"] = "Sonraki Yl (Men iin basl tutunuz)"; -Calendar._TT["SEL_DATE"] = "Tarih seiniz"; -Calendar._TT["DRAG_TO_MOVE"] = "Tamak iin srkleyiniz"; -Calendar._TT["PART_TODAY"] = " (bugn)"; -Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gnnden balasn"; -Calendar._TT["SUN_FIRST"] = "Takvim Pazar gnnden balasn"; -Calendar._TT["CLOSE"] = "Kapat"; -Calendar._TT["TODAY"] = "Bugn"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; - -Calendar._TT["WK"] = "Hafta"; diff --git a/phpgwapi/inc/jscalendar/lang/calendar-zh.js b/phpgwapi/inc/jscalendar/lang/calendar-zh.js deleted file mode 100644 index 4549c2aac0..0000000000 --- a/phpgwapi/inc/jscalendar/lang/calendar-zh.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** Translated by ATang ** I18N -Calendar._DN = new Array -("", - "һ", - "ڶ", - "", - "", - "", - "", - ""); -Calendar._MN = new Array -("һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "лܿʼһ"; -Calendar._TT["PREV_YEAR"] = "һ (ס˵)"; -Calendar._TT["PREV_MONTH"] = "һ (ס˵)"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = "һ (ס˵)"; -Calendar._TT["NEXT_YEAR"] = "һ (ס˵)"; -Calendar._TT["SEL_DATE"] = "ѡ"; -Calendar._TT["DRAG_TO_MOVE"] = "϶"; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = "ʾһ"; -Calendar._TT["SUN_FIRST"] = "ʾ"; -Calendar._TT["CLOSE"] = "ر"; -Calendar._TT["TODAY"] = ""; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = ""; diff --git a/phpgwapi/inc/jscalendar/release-notes.html b/phpgwapi/inc/jscalendar/release-notes.html deleted file mode 100644 index efb3fa2ecd..0000000000 --- a/phpgwapi/inc/jscalendar/release-notes.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - jscalendar-0.9.3 release notes - - - -

jscalendar-0.9.3 release notes

- -

This release compiled at Wednesday, 9 Jul 2003 (00:39).

- -

New stuff

- -
    - -
  • Opera 7 compatibility — keyboard navigation is - still not available; text selection can't be disabled, leading to an - ugly effect when walking through the month/year menus.
  • - -
  • Ability to align the calendar relative to the input field (or any - other element). Vertical: top, center, bottom. Horizontal: left, - center, right. This is established as a new parameter for - showAtElement.
  • - -
  • Added dateClicked property (boolean). This can be - inspected in the "onSelect" handler to determine if a date was - really clicked or the user only changed month/year using the menus. - You need to check this for "single-click" calendars and - only close/hide the calendar if it's true.
  • - -
  • Full documentation in HTML - and PDF format is now available in the - distribution archive.
  • - -
  • New language definition files: HU, HR, PT, ZH. Thanks those who - submitted!
  • - -
- -

Bug status

- -

This covers only those bugs that have been reported at SourceForge.

- -
    - -
  1. #703,238 — fixed
  2. -
  3. #703,814 — fixed
  4. -
  5. #716,777 — closed (was fixed already in 0.9.2-1)
  6. -
  7. #723,335 — fixed
  8. -
  9. #715,122 — feature request; implemented.
  10. -
  11. #721,206 — fixed (added "refresh()" function)
  12. -
  13. #721,833 — fixed (bug concerning the "yy" format - parsing)
  14. -
  15. #721,833 — won't fix (we won't set the time to - midnight; time might actually be useful when we implement support - for time selection). - -
- -
-
Mihai Bazon
- - -Last modified on Tue Jul 8 21:52:23 2003 - - - - - - diff --git a/phpgwapi/inc/jscalendar/simple-1.html b/phpgwapi/inc/jscalendar/simple-1.html deleted file mode 100644 index 779f3f9dec..0000000000 --- a/phpgwapi/inc/jscalendar/simple-1.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - -Simple calendar setups [popup calendar] - - - - - - - - - - - - - - - - - -

DHTML Calendar — for the impatient

- -
-

- This page lists some common setups for the popup calendar. In - order to see how to do any of them please see the source of this - page. For each example it's structured like this: there's the - <form> that contains the input field, and following there is - the JavaScript snippet that setups that form. An example of - flat calendar is available in another page. -

-

- The code in this page uses a helper function defined in - "calendar-setup.js". With it you can setup the calendar in - minutes. If you're not that impatient, ;-) complete documenation is - available. -

-
- - - -
- -

Basic setup: one input field only. Clicking in the input field -activates the calendar. Default date format is "y/mm/dd". The calendar -defaults to "single-click mode".

- -

Note: for some reason this example works -only with Mozilla. It seems that IE and Opera can't set the onclick handler -correctly for the input field.

- -
- -
- - - - - -
- -

Input field with a trigger button. Clicking the button activates -the calendar. Note that this one needs double-click (singleClick parameter -is explicitely set to false).

- -
- -
- - - - - -
- -

Input field with a trigger image. Note that the Calendar.setup -function doesn't care if the trigger is a button, image, or anything else. -Also in this example we setup a different alignment, just to show how it's -done. The input field is read-only (that is set from HTML).

- -
- - - -
-
- - - - - -
- -

Hidden field, display area. The calendar now puts the date into 2 -elements: one is an input field of type "hidden"—so that the user -can't directly see or modify it— and one is a <span> element in -which the date is displayed. Note that if the trigger is not specified the -calendar will use the displayArea (or inputField as in the first example). -The display area can have it's own format. This is useful if, for instance, -we need to store one format in the database (thus pass it in the input -field) but we wanna show a friendlier format to the end-user.

- -
- -
- -

Your birthday: - Click to open date selector.

- - - - - -
- -

Hidden field, display area, trigger image. Very similar to the -previous example. The difference is that we also have a trigger image.

- -
- -
- -

Your birthday: -- not entered -- .

- - - - - -
- -

Hidden field, display area. Very much like the previous examples, -but we now disable some dates (all weekends, that is, Saturdays and -Sundays).

- -
- -
- -

Your birthday: - Click to open date selector.

- - - - - - diff --git a/phpgwapi/inc/jscalendar/simple-2.html b/phpgwapi/inc/jscalendar/simple-2.html deleted file mode 100644 index 8c41504f85..0000000000 --- a/phpgwapi/inc/jscalendar/simple-2.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - -Simple calendar setup [flat calendar] - - - - - - - - - - - - - - - - - -

DHTML Calendar — for the impatient

- -
-

- This page demonstrates how to setup a flat calendar. Examples of - popup calendars are available in another page. -

-

- The code in this page uses a helper function defined in - "calendar-setup.js". With it you can setup the calendar in - minutes. If you're not that impatient, ;-) complete documenation is - available. -

-
- - - -
- -
- - - -

The positioning of the DIV that contains the calendar is entirely your -job. For instance, the "calendar-container" DIV from this page has the -following style: "float: right; margin-left: 1em; margin-bottom: 1em".

- -

Following there is the code that has been used to create this calendar. -You can find the full description of the Calendar.setup() function -in the calendar documenation.

- -
<div style="float: right; margin-left: 1em; margin-bottom: 1em;"
-id="calendar-container"></div>
-
-<script type="text/javascript">
-  function dateChanged(calendar) {
-    // Beware that this function is called even if the end-user only
-    // changed the month/year.  In order to determine if a date was
-    // clicked you can use the dateClicked property of the calendar:
-    if (calendar.dateClicked) {
-      // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
-      var y = calendar.date.getFullYear();
-      var m = calendar.date.getMonth();     // integer, 0..11
-      var d = calendar.date.getDate();      // integer, 1..31
-      // redirect...
-      window.location = "/" + y + "/" + m + "/" + d + "/index.php";
-    }
-  };
-
-  Calendar.setup(
-    {
-      flat         : "calendar-container", // ID of the parent element
-      flatCallback : dateChanged           // our callback function
-    }
-  );
-</script>
- - -