← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10779: Minor fix for tabular report.

 

------------------------------------------------------------
revno: 10779
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-05-08 11:49:01 +0700
message:
  Minor fix for tabular report.
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-05 16:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-05-08 04:49:01 +0000
@@ -311,18 +311,13 @@
                 var selected = a.getValue();
 				if( selected.length > 0 )
 				{
-					var idx = a.store.findExact('id', selected);
-					var name = a.store.getAt(idx).data.name;
-					var valueType = a.store.getAt(idx).data.valueType;
+					var array = [];
+					Ext.Array.each(selected, function(item) {
+						var data = a.store.findExact('id', item);
+						array.push({id: item, uid:a.store.getAt(data).data.uid, name: a.store.getAt(data).data.name, compulsory: a.store.getAt(data).data.compulsory, valueType: a.store.getAt(data).data.valueType});
+					});
+					s.store.add(array);
 					
-					if (selected.length) {
-						var array = [];
-						Ext.Array.each(selected, function(item) {
-							var data = a.store.findExact('id', item);
-							array.push({id: item, uid:a.store.getAt(data).data.uid, name: a.store.getAt(data).data.name, compulsory: a.store.getAt(data).data.compulsory, valueType: a.store.getAt(data).data.valueType});
-						});
-						s.store.add(array);
-					}
 					this.filterAvailable(a, s);
 					
 					if(f!=undefined)