dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11604
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3348: Minor improvement
------------------------------------------------------------
revno: 3348
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-11 17:07:08 +0200
message:
Minor improvement
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm
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/style/dashboard.css
--
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-api/src/main/java/org/hisp/dhis/period/PeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java 2011-03-03 18:29:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodType.java 2011-04-11 15:07:08 +0000
@@ -102,7 +102,7 @@
{
for ( PeriodType periodType : getAvailablePeriodTypes() )
{
- if ( periodType.getName().toLowerCase().trim().equals( name ) )
+ if ( name != null && periodType.getName().toLowerCase().trim().equals( name.toLowerCase().trim() ) )
{
return periodType;
}
@@ -111,8 +111,6 @@
return null;
}
-
-
// -------------------------------------------------------------------------
// Persistable
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2011-04-11 09:14:35 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2011-04-11 15:07:08 +0000
@@ -28,4 +28,5 @@
operations = Operations
read = Read
confirm_delete_message = Are you sure you want to delete the message?
-unread_messages = unread messages
\ No newline at end of file
+unread_messages = unread messages
+unread_message = unread message
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js 2011-04-04 17:12:01 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js 2011-04-11 15:07:08 +0000
@@ -3,3 +3,8 @@
{
removeItem( id, "", i18n_confirm_delete_message, "removeMessage.action" );
}
+
+function read( id )
+{
+ window.location.href = "readMessage.action?id=" + id;
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2011-04-11 09:14:35 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2011-04-11 15:07:08 +0000
@@ -42,7 +42,8 @@
</div>
#end
-<h3>$i18n.getString( "dashboard" ) #if( $messageCount > 0 )<a href="message.action">$messageCount $i18n.getString( "unread_messages" )</a>#end</h3>
+<h3>$i18n.getString( "dashboard" )
+#if( $messageCount > 0 )<a href="message.action">$messageCount #if( $messageCount > 1 )$i18n.getString( "unread_messages" )#else$i18n.getString( "unread_message" )#end</a> #end</h3>
<table cellspacing="0" cellpadding="0" style="width:960px">
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2011-04-04 17:12:01 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2011-04-11 15:07:08 +0000
@@ -6,18 +6,18 @@
<div style="margin-bottom:15px"><input type="button" value="$i18n.getString( 'new_message' )" onclick="window.location.href='showSendMessage.action'"></div>
-<table style="width:75%" class="plainList">
+<table style="width:90%" class="plainList">
<tr>
<th>$i18n.getString( "sender" )</th>
+ <th>$i18n.getString( "subject" )</th>
<th>$i18n.getString( "date" )</th>
- <th>$i18n.getString( "subject" )</th>
<th>$i18n.getString( "operations" )</th>
</tr>
#foreach( $message in $messages )
<tr id="tr${message.id}" #if( !$message.read )class="unread"#end>
- <td>$encoder.htmlEncode( $message.message.sender.name )</td>
- <td style="width:80px">$format.formatDate( $message.messageDate )</td>
- <td><a href="readMessage.action?id=${message.id}">$encoder.htmlEncode( $message.message.subject )</a></td>
+ <td style="width:200px" onclick="read( '${message.id}' )">$encoder.htmlEncode( $message.message.sender.name )</td>
+ <td onclick="read( '${message.id}' )">$encoder.htmlEncode( $message.message.subject )</td>
+ <td onclick="read( '${message.id}' )" style="width:80px">$format.formatDate( $message.messageDate )</td>
<td style="width:70px; text-align:center;">
<a href="readMessage.action?id=${message.id}"><img src="../images/read.png" title="$i18n.getString( 'read' )"></a>
<a href="javascript:removeMessage( '${message.id}' )"><img src="../images/delete.png" title="$i18n.getString( 'delete' )"></a>
=== 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-04-04 17:12:01 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm 2011-04-11 15:07:08 +0000
@@ -7,7 +7,7 @@
<div style="margin-bottom:20px; width:50%;">$encoder.htmlEncode( $message.message.text )</div>
<div>
-<input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='message.action'" style="width:120px">
<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>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2011-04-04 17:12:01 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2011-04-11 15:07:08 +0000
@@ -67,6 +67,7 @@
.plainList td
{
border-bottom:1px solid #c0c0c0;
+ cursor:pointer;
}
.unread td