← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13528: minor bugfix in dashboard messages, make sure that is scoped to renderMessagesItem function (bef...

 

------------------------------------------------------------
revno: 13528
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-02 11:24:48 +0100
message:
  minor bugfix in dashboard messages, make sure that  is scoped to renderMessagesItem function (before it was global scoped, so when two or more message item was to be rendered, only the last one would receive items)
modified:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js


--
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/dashboard.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js	2013-12-01 22:36:30 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js	2014-01-02 10:24:48 +0000
@@ -457,11 +457,10 @@
 dhis2.db.renderMessagesItem = function( $d, itemId )
 {
 	var html = dhis2.db.linkItemHeaderHtml( itemId, "Messages" ) + "</ul></div></li>";
-	
+    var $ul = $( "#ul-" + itemId );
+
 	$d.append( html );
-	
-	$ul = $( "#ul-" + itemId );
-	
+
 	$.get( "../api/messageConversations.json?viewClass=detailed&pageSize=5", function( json )
 	{
 		$.each( json.messageConversations, function( index, message )