Merge authors:
  Jan Henrik Ă˜verland (janhenrik-overland)
------------------------------------------------------------
revno: 5366 [merge]
committer: Jan Henrik Overland <janhenrik.overl...@gmail.com>
branch nick: dhis2
timestamp: Mon 2011-12-12 12:03:15 +0100
message:
  Facility layer filter bug fixed.
modified:
  
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-12-02 13:26:11 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-12-12 11:01:38 +0000
@@ -88,6 +88,7 @@
             type: []
         },
         filter: function() {
+            var groupSet = this.cmp.groupSet.getRawValue();
             var type = this.filtering.options.type;
             var add = [];
             if (!type.length || !type[0]) {
@@ -96,12 +97,13 @@
             else {
                 for (var i = 0; i < this.filtering.cache.length; i++) {
                     for (var j = 0; j < type.length; j++) {
-                        if (this.filtering.cache[i].attributes.type == type[j]) {
+                        if (this.filtering.cache[i].attributes[groupSet] === type[j]) {
                             add.push(this.filtering.cache[i]);
                         }
                     }
                 }
             }
+            
             this.layer.removeAllFeatures();
             this.layer.addFeatures(add);
         },

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to