← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11589: Dashboard, made newly created dashboard become active

 

------------------------------------------------------------
revno: 11589
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-06 15:01:38 +0200
message:
  Dashboard, made newly created dashboard become active
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java
  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/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-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java	2013-08-05 08:52:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataSetController.java	2013-08-06 13:01:38 +0000
@@ -58,7 +58,6 @@
 import org.hisp.dhis.dxf2.metadata.MetaData;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.i18n.I18nService;
-import org.hisp.dhis.option.OptionSet;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodType;

=== 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-08-05 23:07:28 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js	2013-08-06 13:01:38 +0000
@@ -45,7 +45,8 @@
 	
 	moduleIntro: "<li><div class='dasboardIntro'>Click Add new to get started</div></li>",
 	
-	dashboardIntro: "<li><div class='dasboardIntro'>Add stuff by searching from the search field above</div></li>",
+	dashboardIntro: "<li><div class='dasboardIntro'>Add stuff by searching from the search field above</div>" +
+			        "<div class='dasboardTip'>Tip: Arrange your dashboard by dragging and dropping items</div></li>",
 	
 	hitHeader: "<li class='hitHeader'>${title}</li>",
 	
@@ -177,8 +178,16 @@
 		url: "../api/dashboards",
 		data: item,
 		contentType: "application/json",
-		success: function( data, text, xhr ) {
-			$( "#dashboardName" ).val( "" );
+		success: function( data, text, xhr ) {			
+			$( "#dashboardName" ).val( "" );			
+			var location = xhr.getResponseHeader( "Location" );
+			
+			if ( location !== undefined && location.lastIndexOf( "/" ) != -1 )
+			{
+				var itemId = location.substring( ( location.lastIndexOf( "/" ) + 1 ) );
+				dhis2.db.current = itemId;				
+			}
+			
 			dhis2.db.renderDashboardListLoadFirst();
 		}
 	} );

=== 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	2013-08-05 23:07:28 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2013-08-06 13:01:38 +0000
@@ -52,6 +52,13 @@
   color: #bbb;
 }
 
+.dasboardTip
+{
+  padding: 20px 140px;
+  font-size: 22px;
+  color: #bbb;
+}
+
 .currentDashboard
 {
   background-color: #eee;