[Join-cvs] join1/src/web/scripts calendar.js,1.1,1.2
Brought to you by:
lbroudoux
|
From: Laurent B. <lbr...@us...> - 2008-02-03 23:05:14
|
Update of /cvsroot/join/join1/src/web/scripts In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11675/scripts Modified Files: calendar.js Log Message: Convert functin in vars for Ajax support Index: calendar.js =================================================================== RCS file: /cvsroot/join/join1/src/web/scripts/calendar.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calendar.js 30 Jul 2006 19:50:47 -0000 1.1 --- calendar.js 3 Feb 2008 23:05:11 -0000 1.2 *************** *** 18,22 **** /* Get the style of this div tag */ ! function getDivStyle(divname){ var style; if (isDOM){ --- 18,22 ---- /* Get the style of this div tag */ ! var getDivStyle = function(divname){ var style; if (isDOM){ *************** *** 30,39 **** /* Hide the given element */ ! function hideElement(divname){ getDivStyle(divname).visibility = 'hidden'; } /* Get number of days into month */ ! function getDays(month, year){ // Test for leap year when February is selected. if (1 == month){ --- 30,39 ---- /* Hide the given element */ ! var hideElement = function(divname){ getDivStyle(divname).visibility = 'hidden'; } /* Get number of days into month */ ! var getDays = function(month, year){ // Test for leap year when February is selected. if (1 == month){ *************** *** 45,54 **** } ! function getToday() { ! // Generate today's date. ! this.now = new Date(); ! this.year = this.now.getFullYear(); ! this.month = this.now.getMonth(); ! this.day = this.now.getDate(); } --- 45,54 ---- } ! var getToday = function(){ ! // Generate today's date. ! this.now = new Date(); ! this.year = this.now.getFullYear(); ! this.month = this.now.getMonth(); ! this.day = this.now.getDate(); } *************** *** 57,61 **** /* Create a new calendar */ ! function newCalendar(eltName, attachedElement){ if (attachedElement){ if (displayDivName && displayDivName != eltName){ --- 57,61 ---- /* Create a new calendar */ ! var newCalendar = function(eltName, attachedElement){ if (attachedElement){ if (displayDivName && displayDivName != eltName){ *************** *** 93,97 **** /* Increment month of displayed calendar */ ! function incMonth(delta, eltName){ displayMonth += delta; if (displayMonth >= 12){ --- 93,97 ---- /* Increment month of displayed calendar */ ! var incMonth = function(delta, eltName){ displayMonth += delta; if (displayMonth >= 12){ *************** *** 109,113 **** /* Increment year of displayed calendar */ ! function incYear(delta,eltName){ displayYear = parseInt(displayYear + '') + delta; newCalendar(eltName); --- 109,113 ---- /* Increment year of displayed calendar */ ! var incYear = function(delta,eltName){ displayYear = parseInt(displayYear + '') + delta; newCalendar(eltName); *************** *** 115,119 **** /* Build a days grid in html */ ! function makeDaysGrid(startDay, day, intDaysInMonth, newCal, eltName) { var daysGrid; var month = newCal.getMonth(); --- 115,119 ---- /* Build a days grid in html */ ! var makeDaysGrid = function(startDay, day, intDaysInMonth, newCal, eltName){ var daysGrid; var month = newCal.getMonth(); *************** *** 184,188 **** /* Set the day into form element */ ! function setDay(day, eltName){ if (day < 10) day = '0' + day; if (displayPattern == "dd/MM/yyyy"){ --- 184,188 ---- /* Set the day into form element */ ! var setDay = function(day, eltName){ if (day < 10) day = '0' + day; if (displayPattern == "dd/MM/yyyy"){ *************** *** 196,200 **** /* Display or hide the calendar */ ! function toggleVisible(divname){ divstyle = getDivStyle(divname); if (divstyle.visibility == 'visible' || divstyle.visibility == 'show') { --- 196,200 ---- /* Display or hide the calendar */ ! var toggleVisible = function(divname){ divstyle = getDivStyle(divname); if (divstyle.visibility == 'visible' || divstyle.visibility == 'show') { *************** *** 207,211 **** /* Main function, called by onmouseover event */ ! function toggleDatePicker(eltName, formElt, pattern){ var x = formElt.indexOf('.'); var formName = formElt.substring(0,x); --- 207,211 ---- /* Main function, called by onmouseover event */ ! toggleDatePicker = function(eltName, formElt, pattern){ var x = formElt.indexOf('.'); var formName = formElt.substring(0,x); |