You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/03/18 19:22:14 UTC
svn commit: r1302192 - in /incubator/openmeetings/trunk/singlewebapp:
WebContent/src/base/ WebContent/src/modules/lzcalendar/
WebContent/src/modules/lzcalendar/compontents/
src/calendarservice/org/openmeetings/axis/services/
Author: sebawagner
Date: Sun Mar 18 18:22:14 2012
New Revision: 1302192
URL: http://svn.apache.org/viewvc?rev=1302192&view=rev
Log:
OPENMEETINGS-7 - Week/month view to return correct weeks if firstday == 1.mm.yyyy of a month view
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/functions.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzViewCalendarEvent.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
incubator/openmeetings/trunk/singlewebapp/src/calendarservice/org/openmeetings/axis/services/CalendarWebService.java
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/functions.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/functions.lzx?rev=1302192&r1=1302191&r2=1302192&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/functions.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/functions.lzx Sun Mar 18 18:22:14 2012
@@ -362,7 +362,7 @@ function parseDateTimeStringFromXmlStrin
var tDay = str.substr(8,2);
var tHour = str.substr(11,2);
var tMin = str.substr(14,2);
- return ""+tDay+"."+tMonth+"."+tYear+""+tHour+":"+tMin;
+ return ""+tDay+"."+tMonth+"."+tYear+" "+tHour+":"+tMin;
}
function parseDateStringFromXmlString(str) {
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx?rev=1302192&r1=1302191&r2=1302192&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx Sun Mar 18 18:22:14 2012
@@ -104,7 +104,7 @@
datapath="tDate" bgcolor="0xFFFFFF" height="19" >
<handler name="ondata" args="d">
var tDate = parseDateOnlyFromXmlString(d.childNodes[0].data);
- this.setAttribute("text",canvas.dayShortNames[tDate.getDay()]+" "+tDate.getDate()+"."+tDate.getMonth());
+ this.setAttribute("text",canvas.dayShortNames[tDate.getDay()]+" "+tDate.getDate()+"."+(tDate.getMonth()+1));
</handler>
</text>
@@ -246,7 +246,7 @@
var tStringWeekDay = canvas.dayShortNames[tDate.getDay()];
if ($debug) Debug.write("Calc Week day ",tStringWeekDay,tDate.getDay(),tDate);
- this.setAttribute("text",canvas.dayShortNames[tDate.getDay()]+" "+tDate.getDate()+"."+tDate.getMonth()+".");
+ this.setAttribute("text",canvas.dayShortNames[tDate.getDay()]+" "+tDate.getDate()+"."+(tDate.getMonth()+1)+".");
</handler>
</text>
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzViewCalendarEvent.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzViewCalendarEvent.lzx?rev=1302192&r1=1302191&r2=1302192&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzViewCalendarEvent.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzViewCalendarEvent.lzx Sun Mar 18 18:22:14 2012
@@ -38,7 +38,7 @@
if (x_canvas + this.width + 4 > canvas.width) {
x_canvas = canvas.width - 310;
- var tX = canvas.getMouse("x")-x_canvas-10;
+ var tX = canvas.getMouse("x")-x_canvas-8;
if (tX + 24 > this.width) {
tX = this.width - 24;
}
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx?rev=1302192&r1=1302191&r2=1302192&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx Sun Mar 18 18:22:14 2012
@@ -69,6 +69,10 @@
<method name="loadAppointments" args="tDate, dayIndex, weekIndex">
<![CDATA[
var tRelaodDataSet = false;
+ var tDateNow = new Date();
+ tDate.setHours(tDateNow.getHours());
+ tDate.setMinutes(tDateNow.getMinutes());
+
if (this.currentDate == null) {
tRelaodDataSet = true;
}
@@ -141,7 +145,7 @@
newAppointment.title = canvas.getLabelName(1444);
var tDate = new Date();
- tDate.setMilliseconds(this.currentDate.getMilliseconds());
+ tDate.setTime(this.currentDate.getTime());
tDate.setMinutes(0);
tDate.setSeconds(0);
tDate.setHours(tDate.getHours()+1);
@@ -151,7 +155,7 @@
newAppointment.start = tDate;
var tDate2 = new Date();
- tDate.setMilliseconds(tDate.getMilliseconds());
+ tDate.setTime(tDate.getTime());
tDate2.setMinutes(0);
tDate2.setSeconds(0);
tDate2.setHours(tDate.getHours()+1);
Modified: incubator/openmeetings/trunk/singlewebapp/src/calendarservice/org/openmeetings/axis/services/CalendarWebService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/calendarservice/org/openmeetings/axis/services/CalendarWebService.java?rev=1302192&r1=1302191&r2=1302192&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/calendarservice/org/openmeetings/axis/services/CalendarWebService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/calendarservice/org/openmeetings/axis/services/CalendarWebService.java Sun Mar 18 18:22:14 2012
@@ -671,15 +671,19 @@ public class CalendarWebService {
int currentWeekDay = currentDate.get(Calendar.DAY_OF_WEEK);
Calendar startWeekDay = Calendar.getInstance();
- startWeekDay
- .setTimeInMillis((currentDate.getTimeInMillis() - ((currentWeekDay - 1) * 86400000)));
- log.debug("startWeekDay 1" + startWeekDay.getTime());
+ log.debug("currentWeekDay -- " + currentWeekDay);
+ log.debug("firstDayInWeek -- " + firstDayInWeek);
- if (currentWeekDay == 1) {
- startWeekDay.setTimeInMillis(startWeekDay.getTimeInMillis()
- - ((7 - firstDayInWeek) * 86400000));
+ if (currentWeekDay == firstDayInWeek) {
+
+ log.debug("ARE equal currentWeekDay -- ");
+
+ startWeekDay.setTime(currentDate.getTime());
+
} else {
+
+ startWeekDay.setTimeInMillis((currentDate.getTimeInMillis() - ((currentWeekDay - 1) * 86400000)));
if (currentWeekDay > firstDayInWeek) {
startWeekDay.setTimeInMillis(startWeekDay.getTimeInMillis()