← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4252: Minor fix to messaging

 

------------------------------------------------------------
revno: 4252
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-08-03 12:05:08 +0200
message:
  Minor fix to messaging
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/ReadMessageAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/RemoveMessageAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/UnreadMessageAction.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2011-06-09 14:43:14 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2011-08-03 10:05:08 +0000
@@ -99,14 +99,14 @@
     {
         UserGroup userGroup = configurationService.getConfiguration().getFeedbackRecipients();
         
-        int count = 0;
+        int r = 0;
         
         if ( userGroup != null && userGroup.getMembers().size() > 0 )
         {
-            count = sendMessage( message, userGroup.getMembers() );
+            r = sendMessage( message, userGroup.getMembers() );
         }
         
-        return count;
+        return r;
     }
         
     public int saveMessage( Message message )

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/ReadMessageAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/ReadMessageAction.java	2011-04-01 19:47:09 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/ReadMessageAction.java	2011-08-03 10:05:08 +0000
@@ -38,6 +38,10 @@
 public class ReadMessageAction
     implements Action
 {
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
     private MessageService messageService;
 
     public void setMessageService( MessageService messageService )
@@ -45,6 +49,10 @@
         this.messageService = messageService;
     }
 
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
     private Integer id;
     
     public void setId( Integer id )
@@ -52,6 +60,10 @@
         this.id = id;
     }
 
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
     private UserMessage message;
     
     public UserMessage getMessage()
@@ -59,6 +71,10 @@
         return message;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     @Override
     public String execute()
         throws Exception

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/RemoveMessageAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/RemoveMessageAction.java	2011-04-01 19:47:09 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/RemoveMessageAction.java	2011-08-03 10:05:08 +0000
@@ -38,6 +38,10 @@
 public class RemoveMessageAction
     implements Action
 {
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
     private MessageService messageService;
 
     public void setMessageService( MessageService messageService )
@@ -45,6 +49,10 @@
         this.messageService = messageService;
     }
 
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
     private Integer id;
     
     public void setId( Integer id )
@@ -52,6 +60,10 @@
         this.id = id;
     }
 
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     public String execute()
         throws Exception
     {

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/UnreadMessageAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/UnreadMessageAction.java	2011-04-01 19:47:09 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/UnreadMessageAction.java	2011-08-03 10:05:08 +0000
@@ -38,6 +38,10 @@
 public class UnreadMessageAction
     implements Action
 {
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
     private MessageService messageService;
 
     public void setMessageService( MessageService messageService )
@@ -45,6 +49,10 @@
         this.messageService = messageService;
     }
 
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
     private Integer id;
     
     public void setId( Integer id )
@@ -52,7 +60,10 @@
         this.id = id;
     }
 
-    @Override
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
     public String execute()
         throws Exception
     {

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm	2011-07-28 09:34:27 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm	2011-08-03 10:05:08 +0000
@@ -1,4 +1,10 @@
 
+<div style="border-bottom: 1px solid #c0c0c0; margin-bottom:15px; padding-bottom:15px; width:50%;">
+<input type="button" value="$i18n.getString( 'mark_unread' )" onclick="window.location.href='unreadMessage.action?id=${message.id}'" style="width:120px">
+<input type="button" value="$i18n.getString( 'remove' )" onclick="window.location.href='removeMessageRedirect.action?id=${message.id}'" style="width:120px">
+<input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='message.action'" style="width:120px">
+</div>
+
 <h3>$encoder.htmlEncode( $message.message.subject )</h3>
 
 <div class="messageDiv"><span class="bold" style="cursor:pointer" onclick="showSenderInfo( ${message.message.sender.id} )">$encoder.htmlEncode( $message.message.sender.name )</span>&nbsp;
@@ -6,12 +12,6 @@
 
 <div style="margin-bottom:20px; width:50%;">$encoder.htmlEncode( $message.message.text )</div>
 
-<div>
-<input type="button" value="$i18n.getString( 'mark_unread' )" onclick="window.location.href='unreadMessage.action?id=${message.id}'" style="width:120px">
-<input type="button" value="$i18n.getString( 'remove' )" onclick="window.location.href='removeMessageRedirect.action?id=${message.id}'" style="width:120px">
-<input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='message.action'" style="width:120px">
-</div>
-
 <div id="senderInfo" style="display:none" class="page">
 <h3>$message.message.sender.name</h3>
 <table>