← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10475: (PT) Cross browser comp fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 10475 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-04-04 15:58:55 +0200
message:
  (PT) Cross browser comp fixes.
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/styles/style.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-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-03-22 11:32:54 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-04-04 13:57:20 +0000
@@ -70,7 +70,6 @@
 				if (!Ext.isIE) {
 					pt.viewport.accordion.setAutoScroll(false);
 					pt.viewport.westRegion.setWidth(pt.conf.layout.west_width);
-					pt.viewport.accordion.getEl().setStyle('margin-right', '2px');
 					pt.viewport.accordion.doLayout();
 				}
 			}
@@ -2020,7 +2019,7 @@
 			indicator = {
 				xtype: 'panel',
 				title: '<div class="pt-panel-title-data">Indicators</div>', //i18n
-				layout: 'fit',
+				bodyStyle: 'padding:2px',
 				hideCollapseTool: true,
 				getData: function() {
 					var data = {
@@ -2045,83 +2044,79 @@
 						pt.conf.layout.west_fill_accordion_indicator
 					);
 				},
-				items: {
-					xtype: 'panel',
-					bodyStyle: 'border:0 none; padding:0',
-					items: [
-						{
-							xtype: 'combobox',
-							cls: 'pt-combo',
-							style: 'margin-bottom:2px; margin-top:0px',
-							width: pt.conf.layout.west_fieldset_width - pt.conf.layout.west_width_padding,
-							valueField: 'id',
-							displayField: 'name',
-							emptyText: 'Select indicator group',
-							editable: false,
-							store: {
-								xtype: 'store',
-								fields: ['id', 'name', 'index'],
-								proxy: {
-									type: 'ajax',
-									url: pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicatorgroup_get,
-									reader: {
-										type: 'json',
-										root: 'indicatorGroups'
-									}
-								},
-								listeners: {
-									load: function(s) {
-										s.add({
-											id: 0,
-											name: 'All indicator groups', //i18n pt.i18n.all_indicator_groups
-											index: -1
-										});
-										s.sort([
-											{
-												property: 'index',
-												direction: 'ASC'
-											},
-											{
-												property: 'name',
-												direction: 'ASC'
-											}
-										]);
-									}
+				items: [
+					{
+						xtype: 'combobox',
+						cls: 'pt-combo',
+						style: 'margin-bottom:2px; margin-top:0px',
+						width: pt.conf.layout.west_fieldset_width - pt.conf.layout.west_width_padding,
+						valueField: 'id',
+						displayField: 'name',
+						emptyText: 'Select indicator group',
+						editable: false,
+						store: {
+							xtype: 'store',
+							fields: ['id', 'name', 'index'],
+							proxy: {
+								type: 'ajax',
+								url: pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicatorgroup_get,
+								reader: {
+									type: 'json',
+									root: 'indicatorGroups'
 								}
 							},
 							listeners: {
-								select: function(cb) {
-									var store = pt.store.indicatorAvailable;
-									store.parent = cb.getValue();
+								load: function(s) {
+									s.add({
+										id: 0,
+										name: 'All indicator groups', //i18n pt.i18n.all_indicator_groups
+										index: -1
+									});
+									s.sort([
+										{
+											property: 'index',
+											direction: 'ASC'
+										},
+										{
+											property: 'name',
+											direction: 'ASC'
+										}
+									]);
+								}
+							}
+						},
+						listeners: {
+							select: function(cb) {
+								var store = pt.store.indicatorAvailable;
+								store.parent = cb.getValue();
 
-									if (pt.util.store.containsParent(store)) {
-										pt.util.store.loadFromStorage(store);
-										pt.util.multiselect.filterAvailable(indicatorAvailable, indicatorSelected);
+								if (pt.util.store.containsParent(store)) {
+									pt.util.store.loadFromStorage(store);
+									pt.util.multiselect.filterAvailable(indicatorAvailable, indicatorSelected);
+								}
+								else {
+									if (cb.getValue() === 0) {
+										store.proxy.url = pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicator_getall;
+										store.load();
 									}
 									else {
-										if (cb.getValue() === 0) {
-											store.proxy.url = pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicator_getall;
-											store.load();
-										}
-										else {
-											store.proxy.url = pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicator_get + cb.getValue() + '.json';
-											store.load();
-										}
+										store.proxy.url = pt.conf.finals.ajax.path_api + pt.conf.finals.ajax.indicator_get + cb.getValue() + '.json';
+										store.load();
 									}
 								}
 							}
-						},
-						{
-							xtype: 'panel',
-							layout: 'column',
-							bodyStyle: 'border-style:none',
-							items: [
-								indicatorAvailable,
-								indicatorSelected
-							]
 						}
-					]
-				},
+					},
+					{
+						xtype: 'panel',
+						layout: 'column',
+						bodyStyle: 'border-style:none',
+						items: [
+							indicatorAvailable,
+							indicatorSelected
+						]
+					}
+				],
 				listeners: {
 					added: function() {
 						pt.cmp.dimension.panels.push(this);
@@ -3016,13 +3011,13 @@
 						this.getSelectionModel().select(this.recordsToSelect);
 						this.recordsToSelect = [];
 						this.numberOfRecords = 0;
-						
+
 						if (doUpdate) {
 							update();
 						}
 					}
 				},
-				multipleExpand: function(id, path, doUpdate) {					
+				multipleExpand: function(id, path, doUpdate) {
 					this.expandPath('/' + pt.conf.finals.root.id + path, 'id', '/', function() {
 						var record = this.getRootNode().findChild('id', id, true);
 						this.recordsToSelect.push(record);
@@ -3515,11 +3510,7 @@
 			});
 
 			accordion = Ext.create('Ext.panel.Panel', {
-				bodyStyle: function() {
-					var style = 'border-style:none; padding:2px; padding-bottom:0; overflow-y:scroll;';
-					style += Ext.isWebKit ? ' padding-right:0;' : '';
-					return style;
-				}(),
+				bodyStyle: 'border-style:none; padding:2px; padding-bottom:0; overflow-y:scroll;',
 				layout: 'fit',
 				items: accordionBody,
 				listeners: {
@@ -3534,7 +3525,17 @@
 				preventHeader: true,
 				collapsible: true,
 				collapseMode: 'mini',
-				width: Ext.isWebKit ? pt.conf.layout.west_width + 8 : pt.conf.layout.west_width + 17,
+				width: function() {
+					if (Ext.isWebKit) {
+						return pt.conf.layout.west_width + 8;
+					}
+					else {
+						if (Ext.isLinux && Ext.isGecko) {
+							return pt.conf.layout.west_width + 13;
+						}
+						return pt.conf.layout.west_width + 17;
+					}
+				}(),
 				items: accordion
 			});
 
@@ -3816,7 +3817,7 @@
 				if (Ext.isArray(r.rowDimensions)) {
 					for (var i = 0, dim; i < r.rowDimensions.length; i++) {
 						dim = pt.conf.finals.dimension.objectNameMap[r.rowDimensions[i]];
-						
+
 						pt.viewport.rowStore.add({
 							id: dim.dimensionName,
 							name: dim.name

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css	2013-03-20 13:58:21 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css	2013-04-04 13:24:28 +0000
@@ -67,33 +67,29 @@
 
 	/* Scrollbar Webkit */
 ::-webkit-scrollbar {
-    width: 10px;
-    height: 10px;
+    width: 8px;
+    height: 7px;
     border: 0 none;
 }
 
 ::-webkit-scrollbar-track:horizontal {
     background-color: #ddd;
     margin: 0 2px;
-    border-top: 2px solid white;
-    border-bottom: 2px solid white;
-}
+    border-bottom: 1px solid white;
+}
+::-webkit-scrollbar-thumb:horizontal {
+	background-color: #bbb;
+    border-bottom: 1px solid white;
+}
+
 ::-webkit-scrollbar-track:vertical {
-    background-color: #ddd;
+    background-color: #e1e1e1;
     margin: 2px 0;
     border-right: 2px solid white;
-    border-left: 2px solid white;
-}
-
-::-webkit-scrollbar-thumb:horizontal {
-	background-color: #bbb;
-    border-top: 2px solid white;
-    border-bottom: 2px solid white;
 }
 ::-webkit-scrollbar-thumb:vertical {
 	background-color: #bbb;
     border-right: 2px solid white;
-    border-left: 2px solid white;
 }
 
 	/* Scrollbar */