← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6856: (patient) Minor fix.

 

------------------------------------------------------------
revno: 6856
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-05-04 17:10:43 +0700
message:
  (patient) Minor fix.
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	2012-05-04 08:50:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-05-04 10:10:43 +0000
@@ -224,8 +224,18 @@
                 }
             },
             unselectAll: function(a, s) {
-                s.store.removeAll();
-                a.store.clearFilter();
+                var elements = s.boundList.all.elements;
+				var index = 0;
+				var arr = [];
+				Ext.Array.each(s.store.data.items, function(item) {
+					if( elements[index].style.display != 'none' )
+					{
+					  arr.push( item.data.id );
+					}
+					index++;
+				}); 
+				s.setValue(arr);
+				this.unselect(a,s);
             },
             filterAvailable: function(a, s) {
 				a.store.filterBy( function(r) {
@@ -1778,7 +1788,7 @@
 																width: 22,
 																handler: function() {
 																	TR.util.multiselect.unselectAll(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
-																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.available, Ext.getCmp('deFilterAvailable').getValue());
+																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.selected, Ext.getCmp('deFilterSelected').getValue());
 																}
 															},
 															{
@@ -1787,7 +1797,7 @@
 																width: 22,
 																handler: function() {
 																	TR.util.multiselect.unselect(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
-																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.available, Ext.getCmp('deFilterAvailable').getValue());
+																	TR.util.multiselect.filterSelector( TR.cmp.params.dataelement.selected, Ext.getCmp('deFilterSelected').getValue());
 																}
 															},
 															'->',