← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10014: Fix bug in tabular report function.

 

------------------------------------------------------------
revno: 10014
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-03-06 22:47:16 +0700
message:
  Fix bug in tabular report function.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm


--
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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-03-06 14:31:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-03-06 15:47:16 +0000
@@ -548,7 +548,7 @@
 confirm_delete_date_range_list=Are you sure you want to delete date range list?
 invalid_position = There are 10 positions supported, include : \n 1.  Orgunit: Rows; Period: Rows; Data: Filters \n 2.  Orgunit: Rows; Period: Columns; Data: Filters \n 3.  Orgunit: Rows; Period: Filters; Data: Filters \n 4.  Orgunit: Rows; Period: Filters; Data: Columns \n 5.  Orgunit: Columns; Period: Rows; Data: Filters \n 6.  Orgunit: Columns; Period: Filters; Data: Rows \n 7.  Orgunit: Filters; Period: Rows; Data: Filters \n 8.  Orgunit: Filters; Period: Rows; Data: Columns \n 9.  Orgunit: Filters; Period: Columns; Data: Rows \n 10. Orgunit: Filters; Period: Filters; Data: Rows
 please_select_one_position_for_row = Please select one position for row
-please_select_one_position_for_filtering = Please select one position for filtering
+please_select_one_position_for_filter = Please select one position for filtering
 select_a_dataelement_for_sum_avg_operator = Please select a data element for sum/avg operator
 runing_validation_rules = Validation rules are being processed, please wait ...
 program_enrollment = Program enrollment
@@ -576,4 +576,4 @@
 advanced_search = Advanced search
 insert_a_report_date = Please enter a report date.
 insert_a_due_date = Please enter a due date.
-view_all = View all
\ No newline at end of file
+view_all = View all

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-02-28 04:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-03-06 15:47:16 +0000
@@ -410,7 +410,7 @@
 				}
 			},
 			addFilterField: function( p, id, name, valueType ){
-				var panelid = 'p_' + id;
+				var panelid = p + '_' + id;
 				var idx = 0;
 				var subPanel = Ext.getCmp(panelid);
 				if( subPanel == undefined )
@@ -443,7 +443,7 @@
 				items[1] = this.createOperatorField(valueType, fieldid);
 				items[2] = this.createFilterField( valueType, fieldid );
 				if( idx == 0 ){
-					items[3] = this.addFieldBtn( panelid, id, name, valueType, idx );
+					items[3] = this.addFieldBtn( p, id, name, valueType, idx );
 				}
 				else
 				{
@@ -453,9 +453,8 @@
 				subPanel.add(items);
 			},
 			removeFilterField: function( p, id ){
-				var e = Ext.getCmp( 'p_' + id );
-				Ext.getCmp(p).remove(e);
-				Ext.getCmp(p).doLayout();
+				var e1 = Ext.getCmp( p + '_' + id );
+				Ext.getCmp(p).remove(e1);
 			},
 			createOperatorField: function( valueType, id ){
 				var params = {};
@@ -616,7 +615,7 @@
 				params.xtype = 'button';
 				params.id = 'filter_rmv_' + id;	
 				params.text = "-";
-				params.tooltip = TR.i18n.add,
+				params.tooltip = TR.i18n.remove,
 				params.handler = function() {
 					var e1 = Ext.getCmp( 'filter_' + id );
 					var e2 = Ext.getCmp( 'filter_opt_' + id );	
@@ -1287,7 +1286,7 @@
 										var fitlerId = 'de_' + filter[0];
 										if(id==fitlerId){
 											TR.util.multiselect.addFilterField( 'filterPanel', fitlerId, name, valueType );
-											var idx = Ext.getCmp('p_' + fitlerId).items.length/4 - 1;
+											var idx = Ext.getCmp('filterPanel_' + fitlerId).items.length/4 - 1;
 											var value = filter[2].replace('(','').replace(')','').replace(/,/g, ';').replace(/'/g, '');
 											
 											if(valueType=='list'){
@@ -1576,7 +1575,7 @@
 		filterReport: function() {
 			if(Ext.getCmp('reportTypeGroup').getValue().reportType=='true')
 			{
-				this.caseBasedReport.filter();
+				this.caseBasedReport.generate();
 			}
 		},
 		getParams: function(isSorted){
@@ -1684,7 +1683,7 @@
 				TR.cmp.params.patientProperty.selected.store.each( function(r) {
 					var propId = r.data.id;
 					var valueType = r.data.valueType;
-					var length = Ext.getCmp('p_' + propId).items.length/4;
+					var length = Ext.getCmp('filterPropPanel_' + propId).items.length/4;
 					var hidden = TR.state.caseBasedReport.isColHidden(propId);
 					
 					for(var idx=0;idx<length;idx++)
@@ -1721,7 +1720,7 @@
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
 					var valueType = r.data.valueType;
 					var deId = r.data.id;
-					var length = Ext.getCmp('p_' + deId).items.length/4;
+					var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 					var hidden = TR.state.caseBasedReport.isColHidden(deId);
 					
 					for(var idx=0;idx<length;idx++)
@@ -1784,7 +1783,7 @@
 				TR.cmp.params.patientProperty.selected.store.each( function(r) {
 					var propId = r.data.id;
 					var valueType = r.data.valueType;
-					var length = Ext.getCmp('p_' + propId).items.length/4;
+					var length = Ext.getCmp('filterPropPanel_' + propId).items.length/4;
 					var hidden = TR.state.caseBasedReport.isColHidden(propId);
 					
 					for(var idx=0;idx<length;idx++)
@@ -1817,7 +1816,7 @@
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
 					var valueType = r.data.valueType;
 					var deId = r.data.id;
-					var length = Ext.getCmp('p_' + deId).items.length/4;
+					var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 					var hidden = TR.state.caseBasedReport.isColHidden(deId);
 					
 					for(var idx=0;idx<length;idx++)
@@ -2072,7 +2071,7 @@
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
 					var valueType = r.data.valueType;
 					var deId = r.data.id;
-					var length = Ext.getCmp('p_' + deId).items.length/4;
+					var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 					
 					for(var idx=0;idx<length;idx++)
 					{
@@ -2176,7 +2175,7 @@
 				TR.cmp.params.dataelement.selected.store.each( function(r) {
 					var valueType = r.data.valueType;
 					var deId = r.data.id;
-					var length = Ext.getCmp('p_' + deId).items.length/4;
+					var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 					
 					for(var idx=0;idx<length;idx++)
 					{
@@ -2289,7 +2288,7 @@
 					var isValid = true;
 					TR.cmp.params.dataelement.selected.store.each( function(r) {
 						var deId = r.data.id;
-						var length = Ext.getCmp('p_' + deId).items.length/4;
+						var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 						for(var idx=0;idx<length;idx++)
 						{
 							var id = deId + '_' + idx;
@@ -4143,7 +4142,7 @@
 																icon: 'images/arrowleftdouble.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.unselectAll(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected, true);
+																	TR.util.multiselect.unselectAll(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected, 'filterPanel');
 																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.selected, Ext.getCmp('deFilterSelected').getValue());
 																}
 															},
@@ -4152,7 +4151,7 @@
 																icon: 'images/arrowleft.png',
 																width: 22,
 																handler: function() {
-																	TR.util.multiselect.unselect(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected, true);
+																	TR.util.multiselect.unselect(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected, 'filterPanel');
 																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.selected, Ext.getCmp('deFilterSelected').getValue());
 																}
 															},
@@ -4287,7 +4286,7 @@
 															},
 															afterrender: function() {
 																this.boundList.on('itemdblclick', function() {
-																	TR.util.multiselect.unselect(TR.cmp.params.dataelement.available, this, true);
+																	TR.util.multiselect.unselect(TR.cmp.params.dataelement.available, this, 'filterPanel');
 																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.available, Ext.getCmp('deFilterAvailable').getValue());
 																}, this);
 															}
@@ -4701,7 +4700,7 @@
 							
 								TR.cmp.params.dataelement.selected.store.each( function(r) {
 									var deId = r.data.id;
-									var length = Ext.getCmp('p_' + deId).items.length/4;
+									var length = Ext.getCmp('filterPanel_' + deId).items.length/4;
 									for(var idx=0;idx<length;idx++)
 									{					
 										var id = deId + '_' + idx;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2013-02-28 04:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2013-03-06 15:47:16 +0000
@@ -169,5 +169,6 @@
 transgender: '$encoder.jsEscape($i18n.getString( 'transgender' ) , "'")',
 verified: '$encoder.jsEscape($i18n.getString( 'verified' ) , "'")',
 declared: '$encoder.jsEscape($i18n.getString( 'declared' ) , "'")',
-approximated: '$encoder.jsEscape($i18n.getString( 'approximated' ) , "'")'
+approximated: '$encoder.jsEscape($i18n.getString( 'approximated' ) , "'")',
+remove: '$encoder.jsEscape($i18n.getString( 'remove' ) , "'")'
 };
\ No newline at end of file