Author: sebawagner
Date: Sat Mar 24 11:10:32 2012
New Revision: 1304762

URL: http://svn.apache.org/viewvc?rev=1304762&view=rev
Log:
IN PROGRESS - issue OPENMEETINGS-7: Replace lzCalendar with non CPL 
implementation 
https://issues.apache.org/jira/browse/OPENMEETINGS-7 - Fix Update RPC call when 
drag and drop calendar event in day/week/month view, fix week/day view events 
not dragable at wrong position, fix dragging object in day/week view to be 
connected to scrolling area and scroll area based on dragging's object mouse 
position

Modified:
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/dragEvent.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzDayView.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzMonthView.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalGridTempDrawView.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzEditCalendarEvent.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=1304762&r1=1304761&r2=1304762&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 11:10:32 2012
@@ -22,9 +22,19 @@
 
        <class name="dragEvent" extends="view">
        
+               <!---
+                       Refrence to the current moving event in the calendar
+                -->
                <attribute name="eventRef" value="null" />
                
+               <!---
+                       @keywords private
+                -->
                <attribute name="timeText" value="" type="string" />
+               
+               <!---
+                       @keywords private
+                -->
                <attribute name="titleText" value="" type="string" />
                
                <!---
@@ -32,6 +42,98 @@
                 -->
                <attribute name="showTime" value="true" type="boolean" />
                
+               <!---
+                       Move x,y to right position in dayview
+                -->
+               <attribute name="fixToPositionInCalendar" value="true" 
type="boolean" />
+               
+               <!---
+                       Reference to current grid view classroot
+                -->
+               <attribute name="calendarViewRef" value="null" />
+               
+               <!---
+                       if true only the date part is updated not the time part 
of the calendar event
+                       when moving to another date
+                -->
+               <attribute name="isMonthMove" value="false" type="boolean" />
+               
+               <!---
+                       @keywords private
+                -->
+               <attribute name="updateObj" value="null" />
+               
+               <!---
+                       @keywords private
+                -->
+               <attribute name="baseUrl" value="" type="string" />
+               
+               <handler name="onx" args="x">
+                       if (this.fixToPositionInCalendar) {
+                               this.fixToPosition();
+                       }
+               </handler>
+               
+               <handler name="ony" args="y">
+                       if (this.fixToPositionInCalendar) {
+                               this.fixToPosition();
+                       }
+               </handler>
+               
+               <!-- 
+                       Scroll calendar day view to position if necessary 
(based on mouse position, not calendar event position!).
+                       This makes only sense if fixToPositionInCalendar is 
true (fixToPositionInCalendar only true if we are in 
+                       a day or week view where there is actually something to 
scroll).
+                -->
+               <handler name="onidle" reference="LzIdleService.LzIdle">
+                       <![CDATA[
+                               if (!this.fixToPositionInCalendar) {
+                                       return;
+                               }
+                               var referenceToScrollView = 
parent.parent.parent._grid._bgArea;
+                               //Scroll calendar day view to position if 
necessary
+                               var tParentScrolly = 
referenceToScrollView.getMouse("y");
+                               if (tParentScrolly < 0) {
+                                       if (referenceToScrollView._scrollArea.y 
< 0) {
+                                               if 
(referenceToScrollView._scrollArea.y+20 < 0) {
+                                                       
referenceToScrollView._scrollArea.setAttribute("y",referenceToScrollView._scrollArea.y+20);
+                                               } else {
+                                                       
referenceToScrollView._scrollArea.setAttribute("y",0);
+                                               }
+                                       }
+                               } else if (referenceToScrollView.height < 
tParentScrolly) {
+                                       var maxScroll = 
referenceToScrollView.height - referenceToScrollView._scrollArea.height;
+                                       if (referenceToScrollView._scrollArea.y 
> maxScroll) {
+                                               if 
(referenceToScrollView._scrollArea.y-20 > maxScroll) {
+                                                       
referenceToScrollView._scrollArea.setAttribute("y",referenceToScrollView._scrollArea.y-20);
+                                               } else {
+                                                       
referenceToScrollView._scrollArea.setAttribute("y",maxScroll);
+                                               }
+                                       } else {
+                                               
referenceToScrollView._scrollArea.setAttribute("y",maxScroll);
+                                       }
+                               }
+                       ]]>
+               </handler>
+               
+               <method name="fixToPosition">
+                       <![CDATA[
+                               //if ($debug) Debug.write("fixToPosition 1 ", 
this.calendarViewRef);
+                               //if ($debug) Debug.write("fixToPosition 2 ", 
this.calendarViewRef.currentOverTrackView);
+                               var currentOverTrackView = 
this.calendarViewRef.currentOverTrackView;
+                               if (currentOverTrackView == null) {
+                                       return;
+                               }
+                               if (this.y < 0) {
+                                       this.setAttribute("y",0);
+                               } else if (this.y + this.height > 
parent.height) {
+                                       
this.setAttribute("y",parent.height-this.height);
+                               } 
+                               this.setAttribute("x",currentOverTrackView.x);
+                       
+                       ]]>
+               </method>
+               
                <handler name="onmouseup" reference="lz.GlobalMouse" args="who">
                this.close();
            </handler>
@@ -52,13 +154,96 @@
            </method>
                
                <method name="close">
-                       this.eventRef.closeDragItem();
-                       lz.Cursor.showHandCursor(true);
-                       lz.ModeManager.globalUnlockMouseEvents();
-                       this.dragger.remove();
-                       this.destroy();
+                       <![CDATA[
+                               var appointmentId = 
this.eventRef.closeDragItem();
+                               this.dragger.remove();
+                               
+                               if (appointmentId > 0) {
+                                       this.updateObj = new Object();
+                                       
+                                       //Point URL to actual File
+                           var urlObject =  lz.Browser.getBaseURL();
+                                       //If Port is Null or undefinied use 
port 80
+                                       if (urlObject.port!=null && 
urlObject.port!=undefined){
+                                               var port = urlObject.port;
+                                               
+                                               if (port != 80) {
+                                                       this.baseUrl = 
urlObject.protocol+"://"+urlObject.host+":"+port+urlObject.path;
+                                               } else {
+                                                       this.baseUrl = 
urlObject.protocol+"://"+urlObject.host+urlObject.path;
+                                               }
+                                       } else {
+                                               this.baseUrl = 
urlObject.protocol+"://"+urlObject.host+urlObject.path;
+                                       }
+                                       
+                                       var currentOverTrackView = 
this.calendarViewRef.currentOverTrackView;
+                                       if (currentOverTrackView == null) {
+                                               if ($debug) 
Debug.warn("currentOverTrackView is NULL, error in view reference!");
+                                               return;
+                                       }
+                                       
+                                       updateObj.appointmentId = appointmentId;
+                                       updateObj.appointmentstart = new 
Date(this.calendarViewRef.currentOverTrackView.dayDate.getTime());
+                                       
+                                       //If it is only drag and dropped in 
month grid we only change dates no times
+                                       if (this.isMonthMove) {
+                                               var tDateStart = 
parseDateTimeFromXmlString(this.eventRef.datapath.xpathQuery('start/text()'));
+                                               
updateObj.appointmentstart.setHours(tDateStart.getHours());
+                                               
updateObj.appointmentstart.setMinutes(tDateStart.getMinutes());
+                                       } else {
+                                               
+                                               var heightInMinutes = 
parent.height/1440;
+                                               var tPixels30Minutes = 
heightInMinutes*30;
+                                               var startRoundBy30Minutes = 
Math.round(this.y/tPixels30Minutes)*tPixels30Minutes;
+                                               
+                                               
updateObj.appointmentstart.setHours(Math.floor((startRoundBy30Minutes/heightInMinutes)/60));
+                                               
updateObj.appointmentstart.setMinutes((startRoundBy30Minutes/heightInMinutes)-(updateObj.appointmentstart.getHours()*60));
+                                       }
+                                       
+                                       updateObj.appointmentend = new 
Date(this.calendarViewRef.currentOverTrackView.dayDate.getTime());
+                                       
+                                       //If it is only drag and dropped in 
month grid we only change dates no times
+                                       if (this.isMonthMove) {
+                                               var tDateEnd = 
parseDateTimeFromXmlString(this.eventRef.datapath.xpathQuery('end/text()'));
+                                               
updateObj.appointmentend.setHours(tDateEnd.getHours());
+                                               
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("New 
appointmentstart ",updateObj.appointmentstart);
+                                       if ($debug) Debug.write("New 
appointmentend ",updateObj.appointmentend);
+                                       
+                                       this.updateAppointmentTimeOnly.doCall();
+                               } else {
+                                       lz.Cursor.showHandCursor(true);
+                                       
lz.ModeManager.globalUnlockMouseEvents();
+                                       this.destroy();
+                               }
+                       ]]>
                </method>
                
+               <netRemoteCallHib name="updateAppointmentTimeOnly" 
funcname="calendarservice.updateAppointmentTimeOnly" 
+                                                         remotecontext="$once{ 
canvas.thishib }" >     
+                       <netparam><method name="getValue">return 
canvas.sessionId; </method></netparam>
+                       <netparam><method name="getValue">return 
parent.parent.updateObj.appointmentId;</method></netparam>
+                       <netparam><method name="getValue">return 
parent.parent.updateObj.appointmentstart;</method></netparam>
+                       <netparam><method name="getValue">return 
parent.parent.updateObj.appointmentend;</method></netparam>
+                       <netparam><method name="getValue">return 
parent.parent.baseUrl;</method></netparam>
+                       <netparam><method name="getValue">return 
hib.userlang;</method></netparam>
+               <handler name="ondata" args="value">
+                       <![CDATA[
+                               if ($debug) 
Debug.write("updateAppointmentTimeOnly ",value);
+                               lz.Cursor.showHandCursor(true);
+                                       
lz.ModeManager.globalUnlockMouseEvents();
+                               parent.calendarViewRef.parent.parent.reload();
+                                       parent.destroy();
+                        ]]>
+               </handler>
+           </netRemoteCallHib> 
+               
                <dragstate name="dragger"/>
                
                <view width="$once{ parent.width }" height="$once{ 
parent.height }" 

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=1304762&r1=1304761&r2=1304762&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:10:32 2012
@@ -57,8 +57,14 @@
                        Prevent from re-rendering when switching the viewState 
                 -->
                <attribute name="reRenderLock" value="false" type="boolean" />
+               
+               <handler name="oninit">
+                       //fix z-Layer
+                       this._header.sendInFrontOf(this._grid);
+                       this._grid.sendToBack();
+               </handler>
                        
-               <view x="41" width="${ parent.width-10 }" height="20" 
bgcolor="0xDDDDDD">
+               <view name="_header" x="41" width="${ parent.width-10 }" 
height="20" bgcolor="0xDDDDDD">
                        <view name="days" datapath="days" width="${ 
(parent.width-41)/classroot.daysPerWeek }" clip="true"
                                                                
bgcolor="0xDDDDDD" height="19">
                                
@@ -98,11 +104,20 @@
                        <simplelayout axis="x" spacing="0" />
                </view>
                
-               <view y="20" width="${ parent.width }" height="${ 
parent.height-20 }">
+               <view name="dragAndDropArea" y="20" width="${ parent.width }" 
height="${ parent.height-20 }" clip="true">
+                       
+                       <view name="_content" width="${ parent.width-10 }" 
height="720" y="${ parent.parent._grid._bgArea._scrollArea.y }">
+                               
+                       
+                       </view>
+                       
+               </view>
+               
+               <view name="_grid" y="20" width="${ parent.width }" height="${ 
parent.height-20 }">
        
-                       <view width="${ parent.width }" height="${ 
parent.height }" clip="true" bgcolor="0xDDDDDD">
+                       <view name="_bgArea" width="${ parent.width }" 
height="${ parent.height }" clip="true" bgcolor="0xDDDDDD">
                
-                               <view width="${ parent.width-10 }" height="721" 
>
+                               <view name="_scrollArea" width="${ 
parent.width-10 }" height="721" >
                                
                                        <handler name="oninit">
                                                
this.setAttribute("y",parent.height-721);
@@ -149,13 +164,11 @@
                                                </handler>
                                                
                                                <handler 
name="onmousetrackover">
-                                                       if ($debug) 
Debug.write("onmousetrackover THIS DAY ",this);
-                                               
parent.parent.currentOverTrackView = this;
+                                               classroot.currentOverTrackView 
= this;
                                            </handler>
                                        
                                            <handler name="onmousetrackout">
-                                               if ($debug) 
Debug.write("onmousetrackout THIS DAY ",this);
-                                               
parent.parent.currentOverTrackView = null;
+                                               //We do not track out cause 
otherwise the dragging view would be at undefined position
                                            </handler>
                                            
                                            <handler name="onmousetrackup">
@@ -272,17 +285,22 @@
                                                                </handler>
                                                                
                                                                <method 
name="closeDragItem">
-                                                                       
lz.Track.deactivate(classroot.dayViewTrackGroup);
-                                                                       
classroot.currentDragEvent = null;
-                                                                       
-                                                                       if 
(classroot.currentOverTrackView != parent) {
-                                                                               
var appointmentId = this.datapath.xpathQuery('appointmentId/text()');
-                                                                               
if ($debug) Debug.write("Move to new Date appointmentId ",appointmentId);
-                                                                       } else {
-                                                                               
if ($debug) Debug.write("Move to same Date");
-                                                                       }
-                                                                       
-                                                                       
this.setAttribute("visibility","visible");      
+                                                                       
<![CDATA[
+                                                                               
var appointmentId = -1;
+                                                                               
lz.Track.deactivate(classroot.dayViewTrackGroup);
+                                                                               
+                                                                               
if (classroot.currentOverTrackView == null 
+                                                                               
                        || classroot.currentOverTrackView == parent.parent) {
+                                                                               
        if ($debug) Debug.write("Move to same Date or outside calendar");
+                                                                               
        this.setAttribute("visibility","visible");      
+                                                                               
} else {
+                                                                               
        appointmentId = 
Number(this.datapath.xpathQuery('appointmentId/text()'));
+                                                                               
        if ($debug) Debug.write("Move to new Date appointmentId 
",appointmentId);
+                                                                               
}
+                                                                               
+                                                                               
classroot.currentDragEvent = null;
+                                                                               
return appointmentId;
+                                                                       ]]>
                                                                </method>
                                                                
                                                                <method 
name="checkIfDragging" args="tRef">
@@ -295,19 +313,20 @@
                                                                                
        lz.Timer.addTimer( new LzDelegate( this, "checkIfDragging" ), 250 );    
                
                                                                                
} else {
                                                                                
        this.startedToDrag = true;
-                                                                               
        var startx = canvas.getMouse("x")-(this.width/2);
-                                                                               
        var starty = canvas.getMouse("y")-(this.height/2);
-                                                                               
        classroot.currentDragEvent = new lz.dragEvent(canvas,{
-                                                                               
                                x:startx,
-                                                                               
                                startx:startx,
-                                                                               
                                y:starty,
-                                                                               
                                starty:starty,
+                                                                               
        classroot.currentOverTrackView = null;
+                                                                               
        classroot.currentOverTrackView = parent.parent;
+                                                                               
        classroot.currentDragEvent = new 
lz.dragEvent(classroot.dragAndDropArea._content,{
+                                                                               
                                x:parent.parent.parent.x,
+                                                                               
                                startx:parent.parent.parent.x,
+                                                                               
                                y:this.y,
+                                                                               
                                starty:this.y,
                                                                                
                                bgcolor:this.bgcolor,
                                                                                
                                height:this.height,
                                                                                
                                width:this.width,
                                                                                
                                eventRef:this,
                                                                                
                                showTime:false,
-                                                                               
                                titleText:this._title.text                      
                                                                
+                                                                               
                                titleText:this._title.text,
+                                                                               
                                calendarViewRef:classroot
                                                                                
                        });
                                                                                
                        
                                                                                
        lz.Track.activate(classroot.dayViewTrackGroup);

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzMonthView.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzMonthView.lzx?rev=1304762&r1=1304761&r2=1304762&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzMonthView.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/layouts/lzMonthView.lzx
 Sat Mar 24 11:10:32 2012
@@ -139,24 +139,26 @@
                                                                                
this.mouseUpDetect = true;
                                                                                
var appointmentId = this.datapath.xpathQuery('appointmentId/text()');
                                                                                
if ($debug) Debug.write("click ",appointmentId);
-                                                                               
parent.parent.parent.parent.parent.parent.selectCalendarEvent(this);
-                                                                               
//this.setAttribute("text",parseTimeStringFromXmlString(d.childNodes[0].data));
+                                                                               
classroot.parent.selectCalendarEvent(this);
                                                                        }
                                                                ]]>
                                                        </handler>
                                                        
                                                        <method 
name="closeDragItem">
-                                                               
lz.Track.deactivate(parent.parent.parent.parent.parent.monthViewTrackGroup);
-                                                               
parent.parent.parent.parent.parent.currentDragEvent = null;
+                                                               var 
appointmentId = -1;
+                                                               
lz.Track.deactivate(classroot.monthViewTrackGroup);
                                                                
-                                                               if 
(parent.parent.parent.parent.parent.currentOverTrackView != 
parent.parent.parent) {
-                                                                       var 
appointmentId = this.datapath.xpathQuery('appointmentId/text()');
-                                                                       if 
($debug) Debug.write("Move to new Date appointmentId ",appointmentId);
+                                                               if 
(classroot.currentOverTrackView == null 
+                                                                               
                        || classroot.currentOverTrackView == 
parent.parent.parent) {
+                                                                       if 
($debug) Debug.write("Move to same Date or outside calendar");
+                                                                       
this.setAttribute("visibility","visible");      
                                                                } else {
-                                                                       if 
($debug) Debug.write("Move to same Date");
+                                                                       
appointmentId = Number(this.datapath.xpathQuery('appointmentId/text()'));
+                                                                       if 
($debug) Debug.write("Move to new Date appointmentId ",appointmentId);
                                                                }
                                                                
-                                                               
this.setAttribute("visibility","visible");      
+                                                               
classroot.currentDragEvent = null;
+                                                               return 
appointmentId;
                                                        </method>
                                                        
                                                        <method 
name="checkIfDragging" args="tRef">
@@ -171,7 +173,7 @@
                                                                                
this.startedToDrag = true;
                                                                                
var startx = canvas.getMouse("x")-(this.width/2);
                                                                                
var starty = canvas.getMouse("y")-(this.height/2);
-                                                                               
parent.parent.parent.parent.parent.currentDragEvent = new lz.dragEvent(canvas,{
+                                                                               
classroot.currentDragEvent = new lz.dragEvent(canvas,{
                                                                                
                        x:startx,
                                                                                
                        startx:startx,
                                                                                
                        y:starty,
@@ -181,10 +183,13 @@
                                                                                
                        width:this.width,
                                                                                
                        eventRef:this,
                                                                                
                        timeText:this._time.text,
-                                                                               
                        titleText:this._title.text                              
                                                        
+                                                                               
                        titleText:this._title.text,
+                                                                               
                        calendarViewRef:classroot,
+                                                                               
                        fixToPositionInCalendar:false,
+                                                                               
                        isMonthMove:true                                        
                                        
                                                                                
                });
                                                                                
                
-                                                                               
lz.Track.activate(parent.parent.parent.parent.parent.monthViewTrackGroup);
+                                                                               
lz.Track.activate(classroot.monthViewTrackGroup);
                                                                                
this.setAttribute("visibility","hidden");       
                                                                        }
                                                                ]]>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalGridTempDrawView.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalGridTempDrawView.lzx?rev=1304762&r1=1304761&r2=1304762&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalGridTempDrawView.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalGridTempDrawView.lzx
 Sat Mar 24 11:10:32 2012
@@ -30,6 +30,7 @@
                
                <handler name="onidle" reference="LzIdleService.LzIdle">
                        <![CDATA[
+                               //Scroll calendar day view to position if 
neccessary
                                var tParentScrolly = 
parent.parent.parent.parent.getMouse("y");
                                if (tParentScrolly < 0) {
                                        if (parent.parent.parent.y < 0) {
@@ -52,6 +53,8 @@
                                        }
                                }
                                
+                               //fix height and position depending if area is 
selected in top or bottom of starting 
+                               //position in day view
                                var tNewMouseY = parent.getMouse("y");
                                tNewMouseY = 
Math.round(tNewMouseY/tPixels30Minutes)*tPixels30Minutes;
                                if (tNewMouseY > this.starty) {
@@ -77,6 +80,7 @@
                                        this.setAttribute("y", 
parent.parent.parent.height-tPixels30Minutes);
                                }
                                
+                               //show start time of new event
                                var startMinutesTotal = 
this.getStartMinutesTotal();
                                var startHours = 
Math.floor(startMinutesTotal/60);
                                var startMinutes = 
startMinutesTotal-(startHours*60);

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=1304762&r1=1304761&r2=1304762&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
 Sat Mar 24 11:10:32 2012
@@ -125,6 +125,9 @@
                        this.setAttribute("calendarEvent",tRef);
                </method>
                
+               <!-- 
+                       The day grid
+                -->
                <state name="day" applied="${ classroot.viewType == 'day' }">
                
                        <lzDayView currentDay="${ classroot.currentDay }">
@@ -135,6 +138,9 @@
                        
                </state>
                
+               <!-- 
+                       The week grid
+                -->
                <state name="week" applied="${ classroot.viewType == 'week' }">
                
                        <!-- A week view is nothing else then 7 days next to 
each other -->
@@ -147,6 +153,9 @@
                        
                </state>
                
+               <!-- 
+                       The month grid
+                -->
                <state name="month" applied="${ classroot.viewType == 'month' 
}">
                
                        <lzMonthView />

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=1304762&r1=1304761&r2=1304762&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:10:32 2012
@@ -108,7 +108,9 @@
                                updateObj.appointmentstart.setHours(hours);
                                updateObj.appointmentstart.setMinutes(mins);
                                
-                               updateObj.appointmentend = 
this._dateEnd.getDate();
+                               var tEnd = new Date();
+                               
tEnd.setTime(this._dateStart.getDate().getTime());
+                               updateObj.appointmentend = tEnd; 
//this._dateEnd.getDate(); we currently do not support multi date events
                                var tTimeEnd = this._timeEnd.getText();
                                var hours = Number(tTimeEnd.substr(0,2));
                                var mins = Number(tTimeEnd.substr(3,2));
@@ -221,13 +223,13 @@
                        
                        
                <!-- Start Date / Time -->
-               <labelText name="_dateTimeStartLabel" x="100" y="50" 
labelid="570" fontstyle="bold" />  
-                       
-               <dateField name="_dateStart" y="50" x="146" width="104" 
datapath="local:classroot.eventDS:/start">
+               <dateField name="_dateStart" y="50" x="100" width="104" 
datapath="local:classroot.eventDS:/start">
                        <handler name="ondata" args="d">
                                
this.setAttribute("text",parseDateStringFromXmlString(d.childNodes[0].data));
                        </handler>
                </dateField>
+               
+               <labelText name="_dateTimeStartLabel" x="220" y="50" 
labelid="570" fontstyle="bold" /> 
                        
                <customEdittext name="_timeStart" x="270" 
                                        y="50" width="50" regexpType="time" 
text="08:00" datapath="local:classroot.eventDS:/start">
@@ -239,13 +241,16 @@
        <!-- End Date / Time -->                        
                <labelText name="_dateTimeEndLabel" x="326" y="50" 
labelid="571" fontstyle="bold" />  
                        
+               <!-- 
+                we currently do not support multi date events
                <dateField name="_dateEnd" y="50" x="372" width="104" 
datapath="local:classroot.eventDS:/end">
                        <handler name="ondata" args="d">
                                
this.setAttribute("text",parseDateStringFromXmlString(d.childNodes[0].data));
                        </handler>
                </dateField>
+                -->
                        
-               <customEdittext name="_timeEnd" x="496" 
+               <customEdittext name="_timeEnd" x="376" 
                                        y="50" width="50" regexpType="time" 
text="10:00" datapath="local:classroot.eventDS:/end">
                <handler name="ondata" args="d">
                                
this.setAttribute("text",parseTimeStringFromXmlString(d.childNodes[0].data));


Reply via email to