Author: sebawagner
Date: Wed Mar 14 18:38:10 2012
New Revision: 1300681

URL: http://svn.apache.org/viewvc?rev=1300681&view=rev
Log:
OPENMEETINGS-85 Fix switching between day's, week's, month's, update 
date-selector layout, remove week-numbers

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/config.xml
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/navi/helpAndBugs.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/lzCalendarGrid.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/userContactsCalendar.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/library.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/config.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/config.xml?rev=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/config.xml 
(original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/config.xml 
Wed Mar 14 18:38:10 2012
@@ -161,7 +161,7 @@ of the red5-servlet
        First day in the Week used by the Calendar
        0 means Sunday
        1 means Monday
-       this is the way how the Celendar inits a week
+       this is the way how the calendar UI shows a week
 -->
 <firstdayinweek>0</firstdayinweek>     
     

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx?rev=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
 Wed Mar 14 18:38:10 2012
@@ -38,8 +38,11 @@
 
 <class name="dateSelectorDay" extends="baseDateSelectorComponent" width="24" 
bgcolor="0xFFFFFF">
 
+       <attribute name="dayIndexNumber" value="-1" type="number" />
+       <attribute name="weekIndexNumber" value="-1" type="number" />
+
        <handler name="onclick">
-               
this.parent.parent.parent.parent.parent.parent.selectDate(this.daydate);
+               
this.parent.parent.parent.parent.parent.parent.selectDate(this.daydate,this.dayIndexNumber,this.weekIndexNumber);
        </handler>
        
        <handler name="ondblclick">
@@ -62,7 +65,7 @@
 
 </class>
 
-<class name="dateSelectorDayHeader" extends="baseDateSelectorComponent" 
width="24" bgcolor="$once{ canvas.basebgcolorizer }" >
+<class name="dateSelectorDayHeader" extends="baseDateSelectorComponent" 
width="24" bgcolor="0xF9F9F9" >
 
        <attribute name="daynumber" value="0" type="number" />
        
@@ -76,7 +79,7 @@
         ]]>
        </method>
        
-       <text fgcolor="white" name="_date" fontsize="10" align="center" 
resize="true"
+       <text fgcolor="0x000000" name="_date" fontsize="10" align="center" 
resize="true"
                  onmouseover="" onmouseout="">
                <labelTooltip name="_tip" />
        </text>
@@ -102,14 +105,22 @@
 
 </class>
 
-<class name="dateSelectorWeek" extends="baseDateSelectorComponent" 
bgcolor="$once{ canvas.baseMouseOvercolorizer }">
+<class name="dateSelectorWeek" extends="baseDateSelectorComponent" 
bgcolor="0xE0E0E0">
+
+       <attribute name="weekIndexNumber" value="-1" type="number" />
 
        <attribute name="firstweekddaydate" value="null" />
        
        <method name="init">
         <![CDATA[ 
         super.init();
-        for( var i = 0 ; i < 7 ; i++ ) new dayclass(this.content,{daydate:new 
Date(firstweekddaydate.getTime()+(86400000*i))});  
+        for( var i = 0 ; i < 7 ; i++ )  {
+               new dayclass(this.content,{
+                                                       daydate:new 
Date(firstweekddaydate.getTime()+(86400000*i)),
+                                                       
weekIndexNumber:this.weekIndexNumber,
+                                                       dayIndexNumber:i
+                                               });
+               }  
                ]]>
        </method>
        
@@ -118,7 +129,7 @@
 </class>
 
 
-<class name="dateSelectorMonth" extends="baseDateSelectorComponent" 
bgcolor="$once{ canvas.baseMouseOvercolorizer }" height="137" width="201">
+<class name="dateSelectorMonth" extends="baseDateSelectorComponent" 
bgcolor="0xE0E0E0" height="137" width="176">
             
        <attribute name="month" value="0" type="number" />
        <attribute name="firstweekNumber" value="0" type="number" />
@@ -130,15 +141,15 @@
         var dateRoot = parent.parent;
         //if ($debug) Debug.write("dateRoot: ",dateRoot);
         this.setAttribute('currentMonthName',dateRoot.monthnames[month]); 
-        new 
lz.dateSelectorWeekNumberHeader(this.weekheader,{labelWeekHeader:canvas.getLabelName(467),bgcolor:canvas.basebgcolorizer});
-        for( var i = 0 ; i < 6 ; i++ ) new 
lz.dateSelectorWeek(this.content,{firstweekddaydate:new 
Date(this.showingdate.getTime()+(604800000*i)),dayclass:dayclass,month:month}); 
 
+        //new 
lz.dateSelectorWeekNumberHeader(this.weekheader,{labelWeekHeader:canvas.getLabelName(467),bgcolor:canvas.basebgcolorizer});
+        for( var i = 0 ; i < 6 ; i++ ) new 
lz.dateSelectorWeek(this.content,{firstweekddaydate:new 
Date(this.showingdate.getTime()+(604800000*i)),dayclass:dayclass,month:month,weekIndexNumber:i});
  
         for( var i = 0 ; i < 7 ; i++ ) new 
lz.dateSelectorDayHeader(this.weekheader,{daynumber:(this.showingdate.getDay()+i)});
  
-        for( var i = 0 ; i < 6 ; i++ ) new 
lz.dateSelectorWeekNumber(this.weekNumber,{weeknumber:( 
(this.firstweekNumber+i<54) ? (this.firstweekNumber+i) : 
((this.firstweekNumber+i)-53) )});
+        //for( var i = 0 ; i < 6 ; i++ ) new 
lz.dateSelectorWeekNumber(this.weekNumber,{weeknumber:( 
(this.firstweekNumber+i<54) ? (this.firstweekNumber+i) : 
((this.firstweekNumber+i)-53) )});
                ]]>
        </method> 
-       <view name="header" layout="axis:x" height="18" bgcolor="$once{ 
canvas.baseMouseOvercolorizer }">
-               <text width="20" fgcolor="white" height="18"
-                       
onmouseover="this.setAttribute('bgcolor',canvas.basebgcolorizer)" 
onmouseout="this.setAttribute('bgcolor',canvas.baseMouseOvercolorizer)">
+       <view name="header" layout="axis:x" height="18" bgcolor="0xE0E0E0">
+               <text width="20" fgcolor="0x000000" height="18" 
+                       onmouseover="this.setAttribute('bgcolor',0xFFFFFF)" 
onmouseout="this.setAttribute('bgcolor',0xE0E0E0)">
                        <handler name="oninit"><![CDATA[
                                this.setAttribute('text','&#60;');]]>
                        </handler>
@@ -146,8 +157,8 @@
                                
this.parent.parent.parent.parent.showPreviewsMonth();
                        </handler>
                </text>
-               <text width="22" fgcolor="white" height="18"
-                       
onmouseover="this.setAttribute('bgcolor',canvas.basebgcolorizer)" 
onmouseout="this.setAttribute('bgcolor',canvas.baseMouseOvercolorizer)">
+               <text width="22" fgcolor="0x000000" height="18"
+                       onmouseover="this.setAttribute('bgcolor',0xFFFFFF)" 
onmouseout="this.setAttribute('bgcolor',0xE0E0E0)">
                        <handler name="oninit"><![CDATA[
                                this.setAttribute('text','&#60;&#60;');]]>
                        </handler>                      
@@ -155,25 +166,27 @@
                                
this.parent.parent.parent.parent.showPreviewsYear();
                        </handler>
                </text> 
-               <view width="116" bgcolor="$once{ canvas.baseMouseOvercolorizer 
}" height="$once{ parent.height }" >
-                       <text fontsize="10" fgcolor="white" align="center" 
text="${ parent.parent.parent.currentMonthName+' 
'+parent.parent.parent.parent.parent.year }" resize="true" />
+               <view width="91" height="$once{ parent.height }" >
+                       <text fontsize="10" fgcolor="0x000000" align="center" 
text="${ parent.parent.parent.currentMonthName+' 
'+parent.parent.parent.parent.parent.year }" resize="true" />
                </view>
-               <text width="22" fgcolor="white" text=">>" height="18"
-                       
onmouseover="this.setAttribute('bgcolor',canvas.basebgcolorizer)" 
onmouseout="this.setAttribute('bgcolor',canvas.baseMouseOvercolorizer)">
+               <text width="22" fgcolor="0x000000" text=">>" height="18"
+                       onmouseover="this.setAttribute('bgcolor',0xFFFFFF)" 
onmouseout="this.setAttribute('bgcolor',0xE0E0E0)">
                        <handler name="onclick">
                                this.parent.parent.parent.parent.showNextYear();
                        </handler>
                </text>
-               <text width="20" fgcolor="white" text="  >" height="18"
-                       
onmouseover="this.setAttribute('bgcolor',canvas.basebgcolorizer)" 
onmouseout="this.setAttribute('bgcolor',canvas.baseMouseOvercolorizer)">
+               <text width="20" fgcolor="0x000000" text="  >" height="18"
+                       onmouseover="this.setAttribute('bgcolor',0xFFFFFF)" 
onmouseout="this.setAttribute('bgcolor',0xE0E0E0)">
                        <handler name="onclick">
                                
this.parent.parent.parent.parent.showNextMonth();
                        </handler>
                </text> 
        </view>
-       <view name="weekheader" layout="axis:x;spacing:1" x="1" y="18" 
bgcolor="$once{ canvas.baseMouseOvercolorizer }"/>
+       <view name="weekheader" layout="axis:x;spacing:1" x="1" y="18" 
bgcolor="0xE0E0E0"/>
+       <!-- 
        <view name="weekNumber" layout="axis:y;spacing:1" x="1" y="35" />
-       <view name="content" layout="axis:y;spacing:1" x="26" y="35" />
+        -->
+       <view name="content" layout="axis:y;spacing:1" x="1" y="35" />
 </class>
 
 <class name="baseDateSelector" extends="baseDateSelectorComponent" >
@@ -194,6 +207,9 @@
        <event name="onmonthSel" />
        <event name="onyearSel" />
        
+       <attribute name="dayIndexNumber" value="-1" type="number" />
+       <attribute name="weekIndexNumber" value="-1" type="number" />
+       
        <handler name="oninit">
                <![CDATA[
                        this.dayNamesLabelIds = [459,453,454,455,456,457,458];
@@ -204,8 +220,6 @@
                                                                
canvas.getLabelName(475),canvas.getLabelName(476),
                                                                
canvas.getLabelName(477),canvas.getLabelName(478),
                                                                
canvas.getLabelName(479),canvas.getLabelName(480)]
-                       //460
-                       //454
                        
                        this.init();
                ]]>
@@ -232,8 +246,14 @@
                                showcalendermonth:showcalendermonth
                        });
                this.hiliteDate(this.showingdate);
-               this.onselect.sendEvent(this.selecteddate);
-               this.checkToday();
+               //this.onselect.sendEvent(this.selecteddate);
+               var ref = this.checkToday();
+               
+               if ($debug) Debug.write("INIT ",ref,ref.daydate);
+               
+               if (ref != null) {
+                       this.selectDate(ref.daydate, ref.dayIndexNumber, 
ref.weekIndexNumber);
+               }
                ]]>
        </method>
        
@@ -244,11 +264,16 @@
                //Debug.write("+++++++ Found Today");
                var ref = 
this.getDateRefByDateNumber(tDate.getDate(),tDate.getMonth());
                ref.setAttribute('bgcolor',0xCECECE);
+               return ref;
         }
+        
+        return 
this.getDateRefByDateNumber(this.showingdate.getDate(),this.showingdate.getMonth())
                ]]>
        </method>
        
-       <method name="selectDate" args="dateObj">
+       <method name="selectDate" args="dateObj,dayIndex,weekIndex">
+               dayIndexNumber = dayIndex;
+               weekIndexNumber = weekIndex;
                this.showingdate = dateObj;
                this.selecteddate = dateObj;
                this.hiliteDate(this.showingdate);
@@ -386,14 +411,14 @@
        <method name="showNextMonth">
                <![CDATA[
                this.clearContent();
-               var preyear = this.showingdate.getFullYear();
-               var previewsMonth = this.showingdate.getMonth()+1;
-               if (previewsMonth>11) {
-                       previewsMonth=0;
-                       preyear++;
+               var nextyear = this.showingdate.getFullYear();
+               var nextMonth = this.showingdate.getMonth()+1;
+               if (nextMonth>11) {
+                       nextMonth=0;
+                       nextyear++;
                }               
-               this.showingdate = new Date(preyear, previewsMonth, 
this.showingdate.getDate());
-               this.onmonthSel.sendEvent(previewsMonth);
+               this.showingdate = new Date(nextyear, nextMonth, 
this.showingdate.getDate());
+               this.onmonthSel.sendEvent(nextMonth);
                this.init();
                ]]>
        </method>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/navi/helpAndBugs.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/navi/helpAndBugs.lzx?rev=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/navi/helpAndBugs.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/navi/helpAndBugs.lzx
 Wed Mar 14 18:38:10 2012
@@ -20,8 +20,8 @@
 -->
 <library>
        
-<class name="helpAndBugs" extends="view" x="${ parent.width-460 }" 
layout="axis:x;spacing:2">
-    <view name="btn0" width="170" height="26">
+<class name="helpAndBugs" extends="view" x="${ parent.width-470 }" 
layout="axis:x;spacing:2">
+    <view name="btn0" width="180" height="26">
         <handler name="onmouseover">
             this._bg.setAttribute("visibility","visible");
         </handler>

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=1300681&r1=1300680&r2=1300681&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
 Wed Mar 14 18:38:10 2012
@@ -26,10 +26,6 @@
                <attribute name="currentDate" value="null" />
                <attribute name="currentWeek" value="0" type="number" />
                <attribute name="currentDay" value="0" type="number" />
-               
-               
-               <attribute name="rowfactor" value="6" type="number" />
-               <attribute name="columnfactor" value="6" type="number" />
                <attribute name="viewType" value="month" type="string" />
                
                <attribute name="reRenderLock" value="false" type="boolean" />
@@ -40,6 +36,19 @@
                        }
                </method>
                
+               <method name="checkAndShow" args="tDate,dayIndex,weekIndex">
+                       this.setCurrentDate(tDate);
+                       this.currentWeek = weekIndex + 1; //the index in the 
xml dataset list construct starts counting with 1
+                       this.currentDay = dayIndex + 1; //the index in the xml 
dataset list construct starts counting with 1
+                       if (this.viewType == "day") {
+                               this.setAttribute("viewType","none");
+                               this.showDay();
+                       } else if (this.viewType == "week") {
+                               this.setAttribute("viewType","none");
+                               this.showWeek();
+                       }
+               </method>
+               
                <method name="isCurrentMonth" args="tMonth">
                        if (this.currentDate == null) {
                                if ($debug) Debug.warn("currentDate is NULL ");
@@ -48,43 +57,22 @@
                        return (tMonth == this.currentDate.getMonth());
                </method>
                
-               <method name="showDay" args="weekNo">
-                       <![CDATA[
-                               this.reRenderLock = false;
-                               var tColumnRelativeToFirstDay = 
this.currentDate.getDay() - canvas.firstdayinweek;
-                               if (tColumnRelativeToFirstDay < 0) {
-                                       tColumnRelativeToFirstDay = 7 + 
tColumnRelativeToFirstDay;
-                               }
-                               
-                               if ($debug) Debug.write("Column Day 
",tColumnRelativeToFirstDay);
-                               
-                               this.currentDay = 
(tColumnRelativeToFirstDay+1); //Column count starts with 1 not with zero
-                               this.currentWeek = 2;
-                               this.setAttribute("viewType","day");
-                               
//rootCalenderNode.days.setAttribute('datapath','days[4]');
-                               
//rootCalenderNode.setAttribute('datapath','getAppointmentsByWeekCalendarResponse/return[2]');
-                               this.setAttribute("rowfactor",1);
-                               this.setAttribute("columnfactor",1);
-                       ]]>
+               <method name="showDay">
+                       if ($debug) Debug.write("Show Day 
",this.currentDay,this.currentWeek);
+                       this.reRenderLock = false;
+                       this.setAttribute("viewType","day");
                </method>
                
-               <method name="showWeek" args="weekNo">
+               <method name="showWeek">
                        this.reRenderLock = true;
-                       this.currentWeek = 2;
                        this.setAttribute("viewType","week");
                        this.reRenderLock = false;
-                       
//rootCalenderNode.setAttribute('datapath','getAppointmentsByWeekCalendarResponse/return[2]');
-                       this.setAttribute("rowfactor",1);
-                       this.setAttribute("columnfactor",7);
                </method>
                
                <method name="showMonth">
                        this.reRenderLock = true;
                        this.setAttribute("viewType","month");
                        this.reRenderLock = false;
-                       
//rootCalenderNode.setAttribute('datapath','getAppointmentsByWeekCalendarResponse/return');
-                       this.setAttribute("rowfactor",6);
-                       this.setAttribute("columnfactor",7);
                </method>
                
                <state name="day" applied="${ classroot.viewType == 'day' }">

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/userContactsCalendar.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/userContactsCalendar.lzx?rev=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/userContactsCalendar.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/compontents/userContactsCalendar.lzx
 Wed Mar 14 18:38:10 2012
@@ -21,11 +21,11 @@
 <library>
 
        <class name="userContactsCalendar" extends="list" fontsize="11" 
-                  bordersize="1" itemclassname="textlistitem">
+                  bordersize="1" itemclassname="textlistitem" 
scrollbarclassname="om_vscrollbar">
                
                <handler name="oninit">
                        this._setbordercolor = true;
-            this.setAttribute('bgcolor', canvas.basebgcolorizer);
+            this.setAttribute('bgcolor', 0xE0E0E0);
             this._setbordercolor = false;
                        this.getUserContactsWithShareCalendar.doCall();
                </handler>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/library.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/library.lzx?rev=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/library.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/library.lzx
 Wed Mar 14 18:38:10 2012
@@ -20,11 +20,11 @@
 -->
 <library>
 
-       <!-- 
+       <!--
        <include href="compontents/" />
        
        <include href="lzCalendar.lzx" />
-        -->
+         -->
        <include href="old_lzCalendar.lzx" />
     <include href="resources.lzx"/>
     <include href="gridsliderlayout.lzx"/>

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=1300681&r1=1300680&r2=1300681&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
 Wed Mar 14 18:38:10 2012
@@ -50,26 +50,44 @@
         _mainScrollBar.setAttribute("visibility","visible");
     </handler>
 
-       <method name="loadAppointments" args="tDate">
+       <method name="loadAppointments" args="tDate, dayIndex, weekIndex">
                <![CDATA[
+                       var tRelaodDataSet = false;
+                       if (this.currentDate == null) {
+                               tRelaodDataSet = true;
+                       }
+                       
+                       if ($debug) Debug.write("loadAppointments ",dayIndex, 
weekIndex, tDate);
+                       
                        this.currentDate = tDate;
-                       var tDay = tDate.getDate();
+                       
this._lzCalendarGrid.checkAndShow(tDate,dayIndex,weekIndex);
+                       
+                       if (tRelaodDataSet) {
+                               this.loadCalendarData();
+               }
+               
+               
+               ]]>
+       </method>
+       
+       <method name="loadCalendarData">
+               <![CDATA[
+                       var tDay = this.currentDate.getDate();
                        if (tDay < 10) tDay = "0"+tDay;
                        
-                       var tMonth = tDate.getMonth() + 1;
+                       var tMonth = this.currentDate.getMonth() + 1;
                        if (tMonth < 10) tMonth = "0"+tMonth;
                
                        var downloadurl = canvas.protocol + 
'://'+canvas.rtmphostlocal+':'+canvas.red5httpport
                               
+canvas.httpRootKey+'services/CalendarService/getAppointmentsByWeekCalendar?'
                               //+'SID='+canvas.sessionId
                               +'&firstDayInWeek='+canvas.firstdayinweek
-                              
+'&startDate='+tDate.getFullYear()+"-"+tMonth+"-"+tDay;
+                              
+'&startDate='+this.currentDate.getFullYear()+"-"+tMonth+"-"+tDay;
               
                
this.getAppointmentsByWeekCalendar.setAttribute("src",downloadurl);
                if ($debug) Debug.write("getAppointmentsByWeekCalendar 
doRequest 1 ",downloadurl);
-               this._lzCalendarGrid.setCurrentDate(tDate);
                this.getAppointmentsByWeekCalendar.doRequest();
-               ]]>
+        ]]>
        </method>
        
        <method name="newCalendarEvent">
@@ -114,18 +132,25 @@
                </handler>
        </dataset>
        
-       <simpleLabelButton labelid="1444" height="24" width="180" x="10" y="10" 
>
+       <!-- 176 pixels is the width of the mini calendar -->
+       <simpleLabelButton labelid="1444" height="24" width="176" x="12" y="10" 
>
         <handler name="onclick">
-            parent.newCalendarEvent();
+            parent.currentDate = null;
         </handler>
     </simpleLabelButton>
        
-       <dateSelector name="_calendar" y="40" x="2">
+       <dateSelector name="_calendar" y="40" x="12">
+               <handler name="onmonthSel" args="tMonth">
+                       parent.currentDate = null;
+               </handler>
+               <handler name="onyearSel" args="tYear">
+                       parent.currentDate = null;
+               </handler>
                <handler name="onselect" args="sel">
                        if ($debug) Debug.write("onselect ",sel);
                        // check for saving
                        if (true) {
-                               parent.loadAppointments(sel);
+                               parent.loadAppointments(sel, 
this.dayIndexNumber, this.weekIndexNumber);
                        } else {
                                //Check Warning
                        if ($debug) Debug.warn("Unsaved Item - Show warning");
@@ -136,9 +161,9 @@
        
        <view resource="messagebox_info_rsc" x="4" y="184" />
        
-       <labelText labelid="807" x="30" y="188" fontstyle="bold" />
+       <labelText labelid="807" x="24" y="182" fontstyle="bold" />
        
-       <labelText labelid="806" x="4" y="216" multiline="true" width="190" />
+       <labelText labelid="806" x="4" y="204" multiline="true" width="190" />
        
        <labelText labelid="1276" x="4" y="266" fontstyle="bold" />
        
@@ -156,7 +181,7 @@
         <labelTooltip labelid="1279" />
     </miniIcons>
        
-       <userContactsCalendar name="_userContacts" y="340" x="4" height="294" 
width="186" />
+       <userContactsCalendar name="_userContacts" y="340" x="4" height="${ 
parent.height - 344 }" width="186" />
        
        <view name="_lzCalendarTobBar" width="${ parent.width - 204 }" x="204" 
height="20">
                
@@ -164,13 +189,13 @@
                
                        <simpleLabelButton labelid="799" height="20" >
                        <handler name="onclick">
-                           parent.parent.parent._lzCalendarGrid.showDay(1,4);
+                           parent.parent.parent._lzCalendarGrid.showDay();
                        </handler>
                    </simpleLabelButton>
                    
                    <simpleLabelButton labelid="800" height="20" >
                        <handler name="onclick">
-                           parent.parent.parent._lzCalendarGrid.showWeek(1);
+                           parent.parent.parent._lzCalendarGrid.showWeek();
                        </handler>
                    </simpleLabelButton>
                    


Reply via email to