← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10880: Fix bug - Not open tabular report function.

 

------------------------------------------------------------
revno: 10880
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-05-18 14:02:39 +0700
message:
  Fix bug - Not open tabular report function.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/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-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-05-15 14:19:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-05-18 07:02:39 +0000
@@ -28,6 +28,8 @@
 					obj.system.level.push({value: r.levels[i].value, name: r.levels[i].name});
 				}
 				
+				obj.system.accessPatientAttributes = r.accessPatientAttributes;
+				
 				return obj;
 			}
 		}
@@ -1896,8 +1898,8 @@
 							&& Ext.getCmp('filter_' + id).getValue()!=''){
 							filterValue = filterValue.toLowerCase();
 							filter += filterOpt + ' ';
-							if( filtif( Ext.getCmp('filter_' + id).getValue()!=null 
-							&& Ext.getCmp('filter_' + id).getValue()!=''){erOpt == 'IN' )
+							if( Ext.getCmp('filter_' + id).getValue()!=null 
+								&& Ext.getCmp('filter_' + id).getValue()!='')
 							{
 								var filterValues = filterValue.split(";");
 								filter +="(";
@@ -3855,7 +3857,10 @@
 														Ext.getCmp('levelCombobox').setValue('1');
 													}
 													Ext.getCmp('dateRangeDiv').setVisible(true);
-													Ext.getCmp('patientPropertiesDiv').setVisible(true);
+													if( TR.init.system.accessPatientAttributes=='true')
+													{
+														Ext.getCmp('patientPropertiesDiv').setVisible(false);
+													}
 													Ext.getCmp('btnSortBy').setVisible(true);
 													Ext.getCmp('relativePeriodsDiv').setVisible(false); 
 													Ext.getCmp('fixedPeriodsDiv').setVisible(false);
@@ -5977,6 +5982,16 @@
         listeners: {
             afterrender: function(vp) {
                 TR.init.initialize(vp);
+				
+				if( TR.init.system.accessPatientAttributes=='false')
+				{
+					Ext.getCmp('patientPropertiesDiv').setVisible(false);
+				}
+				else
+				{
+					Ext.getCmp('patientPropertiesDiv').setVisible(true);
+				}
+				
 				Ext.getCmp('reportTypeGroup').setValue(true);
 				Ext.getCmp('limitOption').setVisible(false);
 				dataElementTabTitle.innerHTML = TR.i18n.data_elements;