← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5366: Facility layer filter bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5366 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
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);
         },