=== 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; }