dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19480
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8512: Impl function for clicking on message icon to show message meta data
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 8512 [merge]
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-12 17:48:35 +0200
message:
Impl function for clicking on message icon to show message meta data
modified:
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/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-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 2012-10-12 14:51:51 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js 2012-10-12 15:48:35 +0000
@@ -43,26 +43,9 @@
return true;
}
-function showSenderInfo( messageId, senderId )
+function toggleMetaData( id )
{
- var metaData = $( "#metaData" + messageId ).html();
-
- $.getJSON( "../dhis-web-commons-ajax-json/getUser.action", { id:senderId }, function( json ) {
- $( "#senderName" ).html( json.user.firstName + " " + json.user.surname );
- $( "#senderEmail" ).html( json.user.email );
- $( "#senderUsername" ).html( json.user.username );
- $( "#senderPhoneNumber" ).html( json.user.phoneNumber );
- $( "#senderOrganisationUnits" ).html( joinNameableObjects( json.user.organisationUnits ) );
- $( "#senderUserRoles" ).html( joinNameableObjects( json.user.roles ) );
- $( "#messageMetaData" ).html( metaData );
-
- $( "#senderInfo" ).dialog( {
- modal : true,
- width : 350,
- height : 350,
- title : "Sender"
- } );
- } );
+ $( "#metaData" + id ).toggle();
}
function sendReply()
=== 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 2012-10-12 15:18:04 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/readMessage.vm 2012-10-12 15:48:35 +0000
@@ -12,44 +12,9 @@
var i18n_sending_message = '$encoder.jsEscape( $i18n.getString( "sending_message" ), "'")';
</script>
-<div id="senderInfo" style="display:none" class="page">
-<h3><span id="senderName"></span></h3>
-<table>
-<tr>
-<td><label>$i18n.getString( "email" ):</label></td>
-<td><span id="senderEmail"></span></td>
-</tr>
-<tr>
-<td><label>$i18n.getString( "username" ):</label></td>
-<td><span id="senderUsername"></span></td>
-</tr>
-<tr>
-<td><label>$i18n.getString( "phone_number" ):</label></td>
-<td><span id="senderPhoneNumber"></span></td>
-</tr>
-<tr>
-<td><label>$i18n.getString( "organisation_units" ):</label></td>
-<td><span id="senderOrganisationUnits"></span></td>
-</tr>
-<tr>
-<td><label>$i18n.getString( "user_roles" ):</label></td>
-<td><span id="senderUserRoles"></span></td>
-</tr>
-<tr>
-<td colspan="2" style="height:15px"></td>
-</tr>
-#if( $auth.hasAccess( "dhis-web-dashboard-integration", "sendMessage" ) )
-<tr>
-<td><label>$i18n.getString( "meta_data" ):</label></td>
-<td><span id="messageMetaData"></span></td>
-</tr>
-#end
-</table>
-</div>
-
<input type="hidden" id="conversationId" value="${conversation.id}"/>
-<div class="messageDiv horizontalMenu">
+<div class="messageTopDiv horizontalMenu">
<ul>
<li><a class="greyButtonLink" href="unreadMessage.action?id=${conversation.id}">$i18n.getString( 'mark_unread' )</a></li>
<li><a class="greyButtonLink" href="removeMessageRedirect.action?id=${conversation.id}">$i18n.getString( 'remove' )</a></li>
@@ -63,18 +28,20 @@
</div>
#foreach( $message in $conversation.messages )
-<div class="messageSymbol"><img src="../images/mail_small.png"></div>
+<div class="messageSymbol"><img src="../images/mail_small.png" onclick="toggleMetaData( '${message.id}' )"></div>
<div class="messageDiv">
<a class="bold userLink" href="profile.action?id=${message.sender.uid}">$encoder.htmlEncode( $message.sender.name )</a>
<span class="grey">$format.formatDate( $message.lastUpdated )</span>
-<p>$!dhisTextUtils.htmlify( $encoder.htmlEncode( $message.text ) )</p>
-<span id="metaData${message.id}" style="display:none">$!encoder.htmlEncode( $message.metaData )</span>
+<div class="messageText">$!dhisTextUtils.htmlify( $encoder.htmlEncode( $message.text ) )</div>
+<div id="metaData${message.id}" class="messageMetaData">$!encoder.htmlEncode( $message.metaData )</div>
</div>
#end
+<div class="replyDiv">
<textarea id="text" name="text" class="replyArea"></textarea>
<div style="margin-top:10px"><a class="blueButtonLink" href="javascript:sendReply()">$i18n.getString( 'reply' )</a></div>
+</div>
<div class="messageBottomDiv horizontalMenu">
<ul>
=== 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 2012-10-12 15:18:04 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2012-10-12 15:48:35 +0000
@@ -254,8 +254,21 @@
{
width: 700px;
border-bottom: 1px solid #cccccc;
- padding-left: 40px;
- padding-top: 14px;
+ padding-left: 38px;
+ padding-top: 16px;
+ padding-bottom: 22px;
+}
+
+.messageText
+{
+ padding: 8px 0;
+}
+
+.messageTopDiv
+{
+ width: 700px;
+ border-bottom: 1px solid #cccccc;
+ padding-top: 10px;
padding-bottom: 35px;
}
@@ -269,20 +282,32 @@
padding-bottom: 15px;
}
+.messageMetaData
+{
+ display: none;
+ color: #666;
+ padding-top: 10px;
+}
+
.messageSymbol
{
- margin-top: 6px;
+ margin-top: 8px;
float: left;
}
.replyArea
{
- width: 495px;
+ width: 530px;
height: 80px;
border: 1px solid #ccc;
resize: none;
overflow: auto;
- padding: 4px 0px 0px 6px;
+ padding: 5px 6px;
+}
+
+.replyDiv
+{
+ margin-top: 15px;
}
div#selectionTree