Author: sebawagner
Date: Sat Mar 24 11:33:59 2012
New Revision: 1304773

URL: http://svn.apache.org/viewvc?rev=1304773&view=rev
Log:
IN PROGRESS - issue OPENMEETINGS-7: Replace lzCalendar with non CPL 
implementation 
https://issues.apache.org/jira/browse/OPENMEETINGS-7 - Fix events that end at 
00:00, fix day/week view for events that end at another day

Modified:
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.lzx

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx?rev=1304773&r1=1304772&r2=1304773&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx
 Sat Mar 24 11:33:59 2012
@@ -255,11 +255,18 @@
                                                                                
                                                                                
var heightInMinutes = parent.height/1440;
                                                                                
var startMin = (startDate.getHours() * 60 ) + startDate.getMinutes();
-                                                                               
var endMin = (endDate.getHours() * 60 ) + endDate.getMinutes();
-                                                                               
                                                                                
this.setAttribute("y",Math.round(heightInMinutes*startMin));
-                                                                               
this.setAttribute("height",Math.round((endMin - startMin)*heightInMinutes));
                                                                                
+                                                                               
if (endDate.getFullYear() > startDate.getFullYear() 
+                                                                               
                || endDate.getMonth() > startDate.getMonth()
+                                                                               
                        || endDate.getDate() > startDate.getDate()) {
+                                                                               
        //If the end date is next year or month or day we need
+                                                                               
        //to mark the rest of the day with the event
+                                                                               
        this.setAttribute("height",parent.height-this.y);
+                                                                               
} else {
+                                                                               
        var endMin = (endDate.getHours() * 60 ) + endDate.getMinutes();
+                                                                               
        this.setAttribute("height",Math.round((endMin - 
startMin)*heightInMinutes));
+                                                                               
}
                                                                                
if ($debug) Debug.write("y,height -- ",this.y,this.height);
                                                                        ]]>
                                                                </handler>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.lzx?rev=1304773&r1=1304772&r2=1304773&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.lzx
 Sat Mar 24 11:33:59 2012
@@ -117,6 +117,11 @@
                                updateObj.appointmentend.setHours(hours);
                                updateObj.appointmentend.setMinutes(mins);
                                
+                               //if we choose 00:00 we actually mean the next 
day at noon
+                               if (hours == 0) {
+                                       tEnd.setTime(tEnd.getTime()+86400000);
+                               }
+                               
                 updateObj.appointmentName = this._title.getText();
                 updateObj.appointmentLocation = this._location.getText();
                 updateObj.appointmentDescription = this._descr.getText();


Reply via email to