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/24 14:03:33 UTC

svn commit: r1304783 - /incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx

Author: sebawagner
Date: Sat Mar 24 13:03:33 2012
New Revision: 1304783

URL: http://svn.apache.org/viewvc?rev=1304783&view=rev
Log:
IN PROGRESS - issue OPENMEETINGS-7: Replace lzCalendar with non CPL implementation 
https://issues.apache.org/jira/browse/OPENMEETINGS-7 - Fix issue with events that are dragged so that they end at 00:00 o'clock

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

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx?rev=1304783&r1=1304782&r2=1304783&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx Sat Mar 24 13:03:33 2012
@@ -215,8 +215,21 @@
 						updateObj.appointmentend.setMinutes(tDateEnd.getMinutes());
 					} else {
 					
-						updateObj.appointmentend.setHours(Math.floor(((startRoundBy30Minutes+this.height)/heightInMinutes)/60));
-						updateObj.appointmentend.setMinutes(((startRoundBy30Minutes+this.height)/heightInMinutes)-(updateObj.appointmentend.getHours()*60));
+						if ($debug) Debug.write("End Hours",Math.floor(((startRoundBy30Minutes+this.height)/heightInMinutes)/60));
+						var endHours = Math.floor(((startRoundBy30Minutes+this.height)/heightInMinutes)/60);
+						
+						if (endHours >= 24) {
+							 
+							updateObj.appointmentend.setHours(0);
+							updateObj.appointmentend.setMinutes(0);
+							updateObj.appointmentend.setTime(updateObj.appointmentend.getTime()+86400000);
+							
+						} else {
+							if ($debug) Debug.write("End Minutes",((startRoundBy30Minutes+this.height)/heightInMinutes)-(updateObj.appointmentend.getHours()*60));
+							updateObj.appointmentend.setMinutes(((startRoundBy30Minutes+this.height)/heightInMinutes)-(updateObj.appointmentend.getHours()*60));
+							updateObj.appointmentend.setHours(endHours);
+						}
+						
 					}
 					
 					if ($debug) Debug.write("New appointmentstart ",updateObj.appointmentstart);