Skip to content

Commit

Permalink
Merge pull request #79 from OpenDevelopmentMekong/impl-77
Browse files Browse the repository at this point in the history
Fixed map filter function
  • Loading branch information
Huyeng authored Nov 17, 2016
2 parents 2e4fed2 + f6ecd70 commit d14ddb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions post-types/templates/page-profiles-list-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
foreach ($profiles as $profile): ?>
<tr>
<td class="td-value">
<?php echo $profile['feature_id'];?>
<?php echo $profile['map_id'];?>
</td>
<?php
foreach ($DATASET_ATTRIBUTE as $key => $value): ?>
Expand Down Expand Up @@ -457,7 +457,8 @@ function create_filter_by_column_index(col_index){
oTable.fnFilterAll(this.value);
var filtered = oTable._('tr', {"filter":"applied"});
<?php
if (isset($map_layers) && !empty($map_layers)) {
$map_layers = get_selected_layers_of_map_by_mapID(get_the_ID());
if (count($map_layers) > 1) {
?>
filterEntriesMap(_.pluck(filtered,mapIdColNumber));
<?php
Expand All @@ -466,6 +467,7 @@ function create_filter_by_column_index(col_index){
});

var filterEntriesMap = function(mapIds){
console.log(mapIds);
var mapIdsString = "('" + mapIds.join('\',\'') + "')";
$( "#searchFeature_by_mapID").val(mapIdsString);
$( "#searchFeature_by_mapID").trigger("keyup");
Expand Down

0 comments on commit d14ddb9

Please sign in to comment.