=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardController.java 2013-07-24 15:55:13 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DashboardController.java 2013-07-25 18:52:33 +0000 @@ -154,9 +154,9 @@ ContextUtils.okResponse( response, "Dashboard item added" ); } - @RequestMapping( value = "/{dashboardUid}/items/{itemUid}/move", method = RequestMethod.PUT, consumes = "application/json" ) + @RequestMapping( value = "/{dashboardUid}/items/{itemUid}/position/{position}", method = RequestMethod.PUT, consumes = "application/json" ) public void moveItem( HttpServletResponse response, HttpServletRequest request, - @PathVariable String dashboardUid, @PathVariable String itemUid, @RequestParam int position ) throws Exception + @PathVariable String dashboardUid, @PathVariable String itemUid, @PathVariable int position ) throws Exception { Dashboard dashboard = dashboardService.getDashboard( dashboardUid ); === 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-07-24 15:58:43 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-07-25 18:52:33 +0000 @@ -2,6 +2,7 @@ dhis2.util.namespace( 'dhis2.db' ); dhis2.db.current; +dhis2.db.currentItem; dhis2.db.currentShareType; dhis2.db.currentShareId; @@ -42,17 +43,21 @@ hitItem: "
  • ${name}" + "Add
  • ", - chartItem: "
  • Remove" + + chartItem: "
  • " + - "
  • ", + "", - mapItem: "
  • Remove" + + mapItem: "
  • " + - "
  • " + "" }; +dhis2.db.dashboardReady = function( id ) +{ +} + dhis2.db.openAddDashboardForm = function() { $( "#addDashboardForm" ).dialog( { @@ -167,7 +172,7 @@ dhis2.db.current = first; } - dhis2.db.renderDashboard( dhis2.db.current ); + dhis2.db.renderDashboard( dhis2.db.current ); } else { @@ -228,14 +233,16 @@ { $d.append( $.tmpl( dhis2.db.tmpl.dashboardIntro ) ); } + + dhis2.db.dashboardReady( id ); } ); } dhis2.db.renderLinkItem = function( $d, itemId, contents, title ) { var html = - "
  • Remove
    " + - "