Author: sebawagner
Date: Wed Mar 28 18:42:05 2012
New Revision: 1306532

URL: http://svn.apache.org/viewvc?rev=1306532&view=rev
Log:
OPENMEETINGS-109 Fixes: Show Number of Unread private messages in the dashboard 
and upgrade layout

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch 
(studIP).xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/conference/roomListItem.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/roomSidebar/conferenceRoomSidebarTabButton.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/infosPanel.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/mainDashboard.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/profilesPanel.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
    
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/dao/PrivateMessagesDaoImpl.java
    
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch 
(studIP).xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch%20%28studIP%29.xml?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch 
(studIP).xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch 
(studIP).xml Wed Mar 28 18:42:05 2012
@@ -1157,7 +1157,7 @@ see http://incubator.apache.org/openmeet
     <value>Profil bearbeiten</value>
   </string>
   <string id="378" name="dashboard">
-    <value>Neue Nachrichten:</value>
+    <value>Ungelesene Nachrichten:</value>
   </string>
   <string id="379" name="dashboard">
     <value>Bild ändern</value>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml 
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/deutsch.xml 
Wed Mar 28 18:42:05 2012
@@ -1533,7 +1533,7 @@ see http://incubator.apache.org/openmeet
   </string>
 
   <string id="378" name="dashboard">
-    <value>Neue Nachrichten:</value>
+    <value>Ungelesene Nachrichten:</value>
   </string>
 
   <string id="379" name="dashboard">

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml 
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/english.xml 
Wed Mar 28 18:42:05 2012
@@ -1533,7 +1533,7 @@ see http://incubator.apache.org/openmeet
   </string>
 
   <string id="378" name="dashboard">
-    <value>New messages</value>
+    <value>Unread messages</value>
   </string>
 
   <string id="379" name="dashboard">
@@ -3241,7 +3241,7 @@ see http://incubator.apache.org/openmeet
   </string>
 
   <string id="804" name="dashboard">
-    <value>$APP_NAME, your web conferencing platform</value>
+    <value>$APP_NAME, your web conferencing platform. You can either follow 
the 1-2-3 steps to enter a conference room directly or you choose the Calendar 
to set up and plan a meeting.</value>
   </string>
 
   <string id="805" name="dashboard">

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml 
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/languages/slovak.xml 
Wed Mar 28 18:42:05 2012
@@ -2435,7 +2435,7 @@ see http://incubator.apache.org/openmeet
     <value>Attendees</value>
   </string>
   <string id="804" name="dashboard">
-    <value>Clickjobfair, your Web Conferencing platform</value>
+    <value>Clickjobfair, your web conferencing platform. You can either follow 
the 1-2-3 steps to enter a conference room directly or you choose the Calendar 
to set up a meeting.</value>
   </string>
   <string id="805" name="dashboard">
     <value>Plan a meeting</value>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
 Wed Mar 28 18:42:05 2012
@@ -43,6 +43,9 @@
     
     <method name="close">
         if ($debug) Debug.write("close: ",this,this.destroyByMethod);
+        //Make sure any cursor status is reset
+               lz.Cursor.restoreCursor();
+               lz.Cursor.showHandCursor(true);
         this.ontabcontentleave.sendEvent();
         if (!this.destroyByMethod) this.destroy();
         return this.destroyByMethod;

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/conference/roomListItem.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/conference/roomListItem.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/conference/roomListItem.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/conference/roomListItem.lzx
 Wed Mar 28 18:42:05 2012
@@ -201,14 +201,14 @@
                ]]>
                </method>
 
-               <simpleLabelButton labelid="131" x="300" width="160" 
height="30" y="17"
+               <simpleLabelButton labelid="131" x="364" width="100" 
height="24" y="24"
                        onclick="parent.checkConditionsWhenButtonClicked(this)">
-                       <view resource="start_conference_rsc" x="130" y="4" />
                        <!--
+                       <view resource="start_conference_rsc" x="130" y="4" />
                        <view resource="go_jump_rsc" x="$once{ parent.width-24 
}" y="6" />
                         -->
                </simpleLabelButton>
-
+               
                <labelTooltip multiline="true" name="_labeltooltip" />
 
        </class>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/roomSidebar/conferenceRoomSidebarTabButton.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/roomSidebar/conferenceRoomSidebarTabButton.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/roomSidebar/conferenceRoomSidebarTabButton.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/roomSidebar/conferenceRoomSidebarTabButton.lzx
 Wed Mar 28 18:42:05 2012
@@ -27,6 +27,8 @@
        
        <attribute name="selected" value="false" type="boolean" />
        
+       <attribute name="textFontSize" value="14" type="number" />
+       
        <attribute name="currentIconRsc" value="" type="string"/>
        
        <handler name="oninit">
@@ -64,7 +66,7 @@
         this._icon.setAttribute("opacity",0.5);
         this._text.setAttribute("opacity",0.5);
         this._bg2.setAttribute("visibility","hidden");
-        this._text.setAttribute("fontstyle","plain");
+        this._text.setAttribute("fontstyle","bold");
         this._text.setAttribute("fgcolor","0xFFFFFF");
     </method>       
     
@@ -77,7 +79,7 @@
     
     <view x="4" y="6" name="_icon" resource="$once{ parent.currentIconRsc }" />
                 
-    <labelText name="_text" x="28" fontsize="14" valign="middle" 
+    <labelText name="_text" x="28" fontsize="$once{ parent.textFontSize }" 
valign="middle" 
                fgcolor="0xFFFFFF" labelid="$once{ parent.labelid }" />
        
 </class>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/infosPanel.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/infosPanel.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/infosPanel.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/infosPanel.lzx
 Wed Mar 28 18:42:05 2012
@@ -40,10 +40,10 @@
 </class>
 
 <!--- "System" panel on the dashboard -->
-<class name="infosPanel" extends="guiPresenter" resizeable="false"
-    width="500" height="224" closable="true" labelid="374" y="10"><!-- 
374:System -->
-       <view y="20" bgcolor="0xEEF0EB" x="1" width="$once{ parent.width-2 }" 
-                 height="$once{ parent.height-21 }" >
+<class name="infosPanel" extends="view" 
+    width="${ canvas.width - this.x - 10}" height="224" y="10">
+    
+       <view width="${ parent.width-2 }" height="$once{ parent.height }" >
         
         <labelText name="_txt" fontstyle="bold" labelid="774" y="0" x="2" />
         
@@ -62,19 +62,17 @@
                           width="$once{ parent.width-210 }" />
         
         <simpleLabelButton labelid="788" width="196" x="$once{ 
parent.width-200 }" 
-               y="$once{ parent.height-80 }" height="38" 
+               y="$once{ parent.height-60 }" height="24" 
                onclick="this.parent.storeSettings();">
-            <view resource="start_conference_rsc" x="160" valign="middle" />
             <handler name="onclick">
                 quicklink('meetings');
             </handler>
             <labelTooltip labelid="769" />
         </simpleLabelButton>
         
-        <simpleLabelButton labelid="805" width="196" x="$once{ 
parent.width-200 }" 
-               y="$once{ parent.height-40 }" height="38" 
+        <simpleLabelButton labelid="291" width="196" x="$once{ 
parent.width-200 }" 
+               y="$once{ parent.height-34 }" height="24" 
                onclick="this.parent.storeSettings();">
-            <view resource="start_conference_rsc" x="160" valign="middle" />
             <handler name="onclick">
                 quicklink('dashboardModuleCalendar');
             </handler>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/mainDashboard.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/mainDashboard.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/mainDashboard.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/mainDashboard.lzx
 Wed Mar 28 18:42:05 2012
@@ -140,26 +140,18 @@
                <![CDATA[
                 if ($debug) Debug.write("getRssFeeds: ",value);
                 parent._bottomArea._boxes.feed1.outputRSS(value.feed2);
-                //parent.feed2.feed.outputRSS(value.feed2);
             ]]>
         </handler>   
     </netRemoteCallHib>      
     
-       <infosPanel x="10" isdragable="false" minimizable="false" 
maximizable="false" closable="false" />
+       <profilesPanel x="10" />
        
-       <profilesPanel x="520" isdragable="false" minimizable="false" 
maximizable="false" closable="false" />
-
-    <!--- Chat module of the dashboard. The fixed size is 810x280
-    <class name="overAllChat" extends="guiPresenter" resizeable="false"
-        width="${ canvas.width-20 }" height="${ canvas.height-360 }" 
-        y="240" x="10" closable="true" labelid="443" 
-        isdragable="false" minimizable="false" 
-                 maximizable="false" closable="false">
-     -->
+       <view height="240" x="516" width="1" bgcolor="0xE0E0E0" />
+       
+       <infosPanel x="520" />
 
-    <guiPresenter name="_bottomArea" resizeable="false" y="240" x="10" 
closable="true" labelid="1304" 
-            width="${ canvas.width-20 }" height="${ canvas.height-360 }" 
visibility="hidden"
-            isdragable="false" minimizable="false" maximizable="false" >
+    <view name="_bottomArea" y="240" x="0"
+            width="${ canvas.width }" height="${ canvas.height-350 }" 
visibility="hidden">
        
        <attribute name="refObjItem" value="null" />
        
@@ -187,7 +179,7 @@
             this.refObjItem.select();
         </method>
         
-        <view width="${ parent.width-2 }" x="1" y="1" height="$once{ 
parent._tabbar.height }" 
+        <view width="${ parent.width }" x="0" y="1" height="$once{ 
parent._tabbar.height }" 
           stretches="both" resource="presenter_thumb_rsc" >
             <handler name="oninit">
                 <![CDATA[
@@ -212,7 +204,7 @@
             </method>            
         </view>
        
-       <view name="_tabbar" x="1" y="1" width="${ parent.width-2 }" height="36"
+       <view name="_tabbar" x="0" y="1" width="${ parent.width }" height="30"
                  layout="axis:x;spacing:2">
                
                <conferenceRoomSidebarTabButton name="myRoomsTabButton" 
height="$once{ parent.height }"
@@ -227,7 +219,7 @@
                     
         </view>        
                
-       <view name="_boxes" height="${ parent.height-42 }" width="${ 
parent.width }" y="41">    
+       <view name="_boxes" height="${ parent.height-35 }" width="${ 
parent.width }" y="35">    
        
             <view name="myMeetings" height="${ parent.height }" width="${ 
parent.width }" visibility="hidden" >
         
@@ -315,20 +307,9 @@
             <rssBox name="feed1" visibility="hidden" width="${ parent.width-4 
}" 
                             height="${ parent.height }" y="0" x="2" />
 
-               <!--
-            <rssPanel name="feed2" x="420" y="230" visibility="hidden" />
-                -->
-            
        </view>        
        
-          
-       
-    </guiPresenter>
-       <!--
-    <rssPanel name="feed1" x="10" y="230" />
-
-    <rssPanel name="feed2" x="420" y="230" />
-        -->
+    </view>
                
 </class>
 

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/profilesPanel.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/profilesPanel.lzx?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/profilesPanel.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/profilesPanel.lzx
 Wed Mar 28 18:42:05 2012
@@ -21,11 +21,10 @@
 <library>
 
 <!--- Logged-in User Profile Panel on the dashboard -->
-<class name="profilesPanel" extends="guiPresenter" resizeable="false"
-    width="${ canvas.width - this.x - 10 }" height="224" y="10" 
closable="true" labelid="375" >
+<class name="profilesPanel" extends="view" width="500" height="224" y="0" >
        
-       <view y="20" bgcolor="0xEEF0EB" x="1" width="${ parent.width-2 }" 
-                 height="$once{ parent.height-21 }" clip="true">
+       <view y="10" x="0" width="$once{ parent.width-2 }" 
+                 height="$once{ parent.height-10 }" clip="true">
        
        <handler name="oninit">
         <![CDATA[
@@ -38,9 +37,22 @@
                
     <handler name="oninit">
         <![CDATA[
+               this.getNumberUnreadMessages.doCall();
                        this.getUserSelf.doCall();
         ]]>
     </handler>
+    
+    
+    <netRemoteCallHib name="getNumberUnreadMessages" 
funcname="userservice.getNumberUnreadMessages" 
+               remotecontext="$once{ canvas.thishib }" > 
+               <netparam><method name="getValue"> return canvas.sessionId; 
</method></netparam>
+       <handler name="ondata" args="value">
+               <![CDATA[
+                               if($debug) 
Debug.write("dashboard/getNumberUnreadMessages: ",value);
+                               
parent._newmessages._text.setAttribute("text","<u>"+value+"</u>");
+               ]]>
+       </handler>
+       </netRemoteCallHib>         
    
    
        <netRemoteCallHib name="getUserSelf" funcname="userservice.getUserSelf" 
@@ -50,6 +62,14 @@
                <![CDATA[
                                if($debug) Debug.write("dashboard/getUserSelf: 
",value);
                                
parent._username.setAttribute('text',canvas.getLabelName(376)+" 
"+value.firstname+' '+value.lastname);
+                               
+                               if (value.adresses != null && 
value.adresses.town != null) {
+                                       
parent._langAndCountry._town.setAttribute("text","<u>" + value.adresses.town + 
"</u>");
+                               }
+                               if (value.omTimeZone != null) {
+                                       
parent._langAndCountry._timeZone.setAttribute("text","<u>" + 
value.omTimeZone.ical + "</u>");
+                               }
+                               
                                if (value.pictureuri==null || 
value.pictureuri.length==0){
                                        value.pictureuri = "d.jpg";
                                } else {
@@ -59,50 +79,105 @@
                                        
+canvas.httpRootKey+'DownloadHandler?fileName='+value.pictureuri
                                        
+'&moduleName=userprofile&parentPath=&room_id='
                                        +'&sid='+canvas.sessionId;
-                       if($debug) Debug.write("dashboard/downloadurl 
"+downloadurl);
-                       parent._userpic.setAttribute('src',downloadurl);        
+                       if($debug) Debug.write("dashboard/downloadurl 
",downloadurl);
+                       
parent._imageProfile._userpic.setAttribute('src',downloadurl);  
                ]]>
        </handler>
        </netRemoteCallHib>         
-       
-    <labelText name="_username" fontstyle="bold" y="2" labelid="376" x="2" />
-    <!--
-    <labelText name="_newmessages" y="40" labelid="378" x="10" />
-     -->
-    <image y="20" x="10" name="_userpic" />
     
-    <simpleLabelButton y="40" labelid="379" x="150" width="140">
-        <handler name="onclick">
-               <![CDATA[
-                       new 
lz.uploadWindowExplorer(canvas.main_content._content.inner,{
-                                   x:300,uploadmodule:'userprofile',
-                                   isOnlyProfile:true,
-                                   returnObj:this,
-                                   servletName:'upload.upload'
-                               });
-               ]]>
-        </handler>
-        <method name="sendRefresh">
-               parent.getUserSelf.doCall();
-        </method>
-       <labelTooltip labelid="379" />
-    </simpleLabelButton>  
-        
-    <simpleLabelButton y="70" labelid="377" x="150" width="140"
-        onclick="quicklinkAct('userSettingsModule')">
+    <view y="2" x="4" name="_imageProfile"  width="120" height="120">
+       <image name="_userpic" >
+    
+               <handler name="onload" args="d">
+                   <![CDATA[
+                       if (this.height > 116) {
+                           //If bigger then containter then scale it
+                           var width = this.width/(this.height/116);
+                           this.setAttribute('height',116);
+                           this.setAttribute('width',width);
+                       }
+                       if (this.width > 116) {
+                               //If bigger then containter then scale it
+                           var height = this.height/(this.width/116);
+                           this.setAttribute('height',height);
+                           this.setAttribute('width',116);
+                       }
+                       if($debug) Debug.write("onload 
",this.height,this.width,d.height,d.width);
+                       
+                       //makes sure bottom area is updated
+                       //this._changeSize.setAttribute('y',this.height-20);
+                       //this._changeSize.setAttribute('width',this.width);
+                   ]]>
+               </handler>
+               
+           </image>
+           
+           <view name="_changeSize" height="48" width="128" y="80" 
bgcolor="0xFFFFFF" opacity="0.5">
+                       <labelText labelid="379" align="center" 
bgcolor="0xFFFFFF"/>
+               <handler name="onclick">
+                       <![CDATA[
+                               new 
lz.uploadWindowExplorer(canvas.main_content._content.inner,{
+                                           x:300,uploadmodule:'userprofile',
+                                           isOnlyProfile:true,
+                                           returnObj:this,
+                                           servletName:'upload.upload'
+                                       });
+                       ]]>
+               </handler>
+               <method name="sendRefresh">
+                       parent.parent.getUserSelf.doCall();
+               </method>
+               <labelTooltip labelid="379" />
+       </view>
+    
+    </view>
+    
+    <labelText name="_username" fontstyle="bold" y="2" labelid="376" x="140" />
+    
+    <view name="_langAndCountry" layout="axis:x;spacing:2" y="20" x="140">
+       <labelText name="_town" fgcolor="0x0000CC">
+               <handler name="onclick">
+                       canvas.userSettingsModuleOpt = "userProfile";
+                   quicklinkAct("userSettingsModule");
+               </handler>
+           </labelText>
+           <labelText labelid="1143" />
+           <labelText name="_timeZone" fgcolor="0x0000CC">
+               <handler name="onclick">
+                       canvas.userSettingsModuleOpt = "userProfile";
+                   quicklinkAct("userSettingsModule");
+               </handler>
+           </labelText>
+    </view>
+    
+    <view name="_newmessages" layout="axis:x;spacing:2" y="40" x="140">
+           <labelText name="_label" labelid="378" />
+           <labelText name="_text" fgcolor="0x0000CC">
+               <handler name="onclick">
+                       canvas.userSettingsModuleOpt = "contactMessages";
+                   quicklinkAct("userSettingsModule");
+               </handler>
+           </labelText>
+    </view>
+    
+    <simpleLabelButton y="60" labelid="377" x="240" width="120" height="20">
        <labelTooltip labelid="377" />
+       <handler name="onclick">
+               canvas.userSettingsModuleOpt = "userProfile";
+            quicklinkAct("userSettingsModule");
+        </handler>
     </simpleLabelButton> 
              
-    <labelText fontstyle="bold" x="2" y="124" labelid="281" width="200"/>
+    <labelText fontstyle="bold" x="2" y="140" labelid="281" width="200"/>
     
-    <labelText name="homepage" x="2" y="140" width="$once{ parent.width - 12 
}" multiline="true" >
+    <labelText name="homepage" x="2" y="160" width="$once{ parent.width }" 
multiline="true" >
         <attribute name="link" type="string" value="" />
         <handler name="onclick">
             lz.Browser.loadURL(this.link,"_blank");
         </handler>            
     </labelText>    
     
-    <labelText name="mailing" x="2" y="170" width="$once{ parent.width - 12 }" 
multiline="true" >
+    <labelText name="mailing" x="2" y="180" width="$once{ parent.width }" 
multiline="true" >
         <attribute name="link" type="string" value="" />
         <handler name="onclick">
             lz.Browser.loadURL(this.link,"_blank");
@@ -110,6 +185,7 @@
     </labelText> 
               
        </view>
+       
 </class> 
 
 </library>

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=1306532&r1=1306531&r2=1306532&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 28 18:42:05 2012
@@ -66,6 +66,9 @@
        </handler>
        
        <handler name="ontabcontentleave" args="tRef">
+               //Make sure any cursor status is reset
+               lz.Cursor.restoreCursor();
+               lz.Cursor.showHandCursor(true);
         _mainScrollBar.setAttribute("visibility","visible");
     </handler>
     
@@ -205,6 +208,9 @@
        
        <dataset name="getAppointmentsByWeekCalendar" type="http">
                <handler name="ondata" args="d">
+                       //Make sure any cursor status is reset
+                       lz.Cursor.restoreCursor();
+                       lz.Cursor.showHandCursor(true);
                        if ($debug) Debug.write("ondata",d);
                </handler>
        </dataset>

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/dao/PrivateMessagesDaoImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/dao/PrivateMessagesDaoImpl.java?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/dao/PrivateMessagesDaoImpl.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/user/dao/PrivateMessagesDaoImpl.java
 Wed Mar 28 18:42:05 2012
@@ -178,6 +178,29 @@ public class PrivateMessagesDaoImpl {
                return null;
        }
        
+       public Long getNumberMessages(Long toUserId, Long 
privateMessageFolderId, boolean isRead) {
+               try {
+                       
+                       String hql = "select COUNT(c.privateMessageId) from 
PrivateMessages c " +
+                                               "where c.to.user_id = :toUserId 
" +
+                                               "AND c.isTrash = :isTrash " +
+                                               "AND c.owner.user_id = 
:toUserId " +
+                                               "AND c.isRead = :isRead " +
+                                               "AND c.privateMessageFolderId = 
:privateMessageFolderId ";
+
+                       TypedQuery<Long> query = em.createQuery(hql, 
Long.class); 
+                       query.setParameter("toUserId", toUserId);
+                       query.setParameter("isTrash", false);
+                       query.setParameter("isRead", false);
+                       query.setParameter("privateMessageFolderId", 
privateMessageFolderId);
+                       return query.getSingleResult();
+                       
+               } catch (Exception e) {
+                       log.error("[getNumberMessages]",e);
+               }
+               return null;
+       }
+       
        public List<PrivateMessages> getPrivateMessagesByUser(Long toUserId, 
String search,
                        String orderBy, int start, Boolean asc, Long 
privateMessageFolderId, int max) {
                try {

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java?rev=1306532&r1=1306531&r2=1306532&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/UserService.java
 Wed Mar 28 18:42:05 2012
@@ -1101,6 +1101,26 @@ public class UserService {
                }
 
        }
+       
+       public Long getNumberUnreadMessages(String SID) {
+               try {
+
+                       Long users_id = sessionManagement.checkSession(SID);
+                       Long user_level = 
userManagement.getUserLevelByID(users_id);
+                       // users only
+                       if (authLevelManagement.checkUserLevel(user_level)) {
+
+                               SearchResult<PrivateMessages> searchResult = 
new SearchResult<PrivateMessages>();
+                               
searchResult.setObjectName(Users.class.getName());
+                               return privateMessagesDao
+                                               .getNumberMessages(users_id, 
0L, false);
+
+                       }
+               } catch (Exception err) {
+                       log.error("[getNumberUnreadMessages]", err);
+               }
+               return null;
+       }
 
        public SearchResult<PrivateMessages> getInbox(String SID, String 
search, String orderBy,
                        int start, Boolean asc, Integer max) {


Reply via email to