← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8492: Enabled click on top menu entries

 

------------------------------------------------------------
revno: 8492
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 18:41:59 +0200
message:
  Enabled click on top menu entries
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/profile/action/GetUserAction.java


--
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-commons-resources/src/main/webapp/main.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2012-10-11 16:23:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.js	2012-10-11 16:41:59 +0000
@@ -19,7 +19,25 @@
     {
         $( this ).attr( "src", "../images/hide.png" );
     } );
+
+	// Set links on top menu items
     
+    $( "#menuLink1" ).click( function() {
+    	window.location.href = "../dhis-web-commons-about/modules.action";
+    } );
+
+    $( "#menuLink2" ).click( function() {
+    	window.location.href = "../dhis-web-commons-about/modules.action";
+    } );
+
+    $( "#menuLink3" ).click( function() {
+    	window.location.href = "../dhis-web-commons-about/help.action";
+    } );
+
+    $( "#menuLink4" ).click( function() {
+    	window.location.href = "../dhis-web-dashboard-integration/profile.action";
+    } );
+	
 	// Set show and hide drop down events on top menu
 	
 	$( "#menuLink1" ).hover( function() 

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/profile/action/GetUserAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/profile/action/GetUserAction.java	2012-10-06 12:30:22 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/profile/action/GetUserAction.java	2012-10-11 16:41:59 +0000
@@ -27,6 +27,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,6 +47,9 @@
     @Autowired
     private UserService userService;
 
+    @Autowired
+    private CurrentUserService currentUserService;    
+    
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -74,7 +78,14 @@
 
     public String execute()
     {
-        user = userService.getUser( id );
+        if ( id != null )
+        {
+            user = userService.getUser( id );
+        }
+        else
+        {
+            user = currentUserService.getCurrentUser();
+        }
         
         return SUCCESS;
     }