← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10552: (PT) Gui issues fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 10552 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-04-15 13:05:02 +0200
message:
  (PT) Gui issues fixed.
modified:
  dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
  dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-04-10 15:21:42 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-04-15 10:41:32 +0000
@@ -56,17 +56,12 @@
 			});
 
 			// Left gui
-			var vph = pt.viewport.westRegion.getHeight(),
-				no = pt.init.ougs.length + pt.init.degs.length,
-				factor = 0,
-				staticHeight = 535,
-				tabHeight = 28;
-
-			if (vph > staticHeight) {
-				var factor = (vph - staticHeight) / tabHeight;
-			}
-
-			if (factor > 7) {
+			var viewportHeight = pt.viewport.westRegion.getHeight(),
+				numberOfTabs = pt.init.ougs.length + pt.init.degs.length + 5,
+				tabHeight = 28,
+				minPeriodHeight = 380;
+
+			if (viewportHeight > numberOfTabs * tabHeight + minPeriodHeight) {
 				if (!Ext.isIE) {
 					pt.viewport.accordion.setAutoScroll(false);
 					pt.viewport.westRegion.setWidth(pt.conf.layout.west_width);
@@ -89,7 +84,7 @@
 			// Fade in
 			Ext.defer( function() {
 				Ext.getBody().fadeIn({
-					duration: 800
+					duration: 400
 				});
 			}, 500 );
 		};
@@ -103,18 +98,19 @@
 		util.dimension = {
 			panel: {
 				setHeight: function(mx) {
-					var ph = pt.cmp.dimension.panels.length * 28,
-						h;
+					var panelHeight = pt.cmp.dimension.panels.length * 28,
+						height;
 
 					if (pt.viewport.westRegion.hasScrollbar) {
-						h = ph + mx;
+						height = panelHeight + mx;
 						pt.viewport.accordion.setHeight(pt.viewport.getHeight() - 2);
-						pt.viewport.accordionBody.setHeight(h);
+						pt.viewport.accordionBody.setHeight(height - 2);
 					}
 					else {
-						h = pt.viewport.westRegion.getHeight() - pt.conf.layout.west_fill;
-						mx += ph;
-						pt.viewport.accordion.setHeight(h > mx ? mx : h);
+						height = pt.viewport.westRegion.getHeight() - pt.conf.layout.west_fill;
+						mx += panelHeight;
+						pt.viewport.accordion.setHeight((height > mx ? mx : height) - 2);
+						pt.viewport.accordionBody.setHeight((height > mx ? mx : height) - 2);
 					}
 				},
 
@@ -3898,7 +3894,7 @@
 				downloadButton: downloadButton,
 				userOrganisationUnit: userOrganisationUnit,
 				userOrganisationUnitChildren: userOrganisationUnitChildren,
-				setFavorite: setFavorite,
+				setFavorite: setFavorite,					
 				items: [
 					westRegion,
 					centerRegion

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-04-10 15:21:42 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js	2013-04-12 09:40:13 +0000
@@ -216,7 +216,7 @@
         west_maxheight_accordion_dataset: 400,
         west_maxheight_accordion_period: 513,
         west_maxheight_accordion_organisationunit: 900,
-        west_maxheight_accordion_group: 298,
+        west_maxheight_accordion_group: 340,
         west_maxheight_accordion_options: 449,
         west_scrollbarheight_accordion_indicator: 300,
         west_scrollbarheight_accordion_dataelement: 300,

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2013-04-04 15:34:51 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2013-04-12 16:13:20 +0000
@@ -342,7 +342,7 @@
         // Fade in
 		Ext.defer( function() {
 			Ext.getBody().fadeIn({
-				duration: 500
+				duration: 400
 			});
 		}, 500 );
     };