Skip to content

Commit

Permalink
Merge pull request #139 from OpenDevelopmentMekong/master
Browse files Browse the repository at this point in the history
merging to prod for releasing v2.1.8
  • Loading branch information
Alex Corbi authored Mar 30, 2017
2 parents f899296 + 614cb68 commit 24f0e33
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
15 changes: 6 additions & 9 deletions post-types/templates/page-profiles-list-page.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php require_once PLUGIN_DIR.'/utils/profile-spreadsheet-post-meta.php'; ?>
<?php require_once (WP_PLUGIN_DIR.'/wp-odm_profile_pages/utils/profile-spreadsheet-post-meta.php'); ?>
<div class="container">
<div class="row">
<div class="sixteen columns">
Expand Down Expand Up @@ -183,10 +183,8 @@
if ($profiles):
foreach ($profiles as $profile): ?>
<tr>
<td>
<div class="td-value-id">
<td class="td-value-id">
<?php echo trim($profile[$id]);?>
</div>
</td>
<?php
if($DATASET_ATTRIBUTE):
Expand Down Expand Up @@ -377,7 +375,7 @@
<?php
} ?>
<?php
if (isset($group_data_by_column_index) && $group_data_by_column_index != '') { ?>
if (isset($group_data_by_column_index) && !empty($group_data_by_column_index)) { ?>
, "aaSortingFixed": [[<?php echo $group_data_by_column_index; ?>, 'asc' ]] //sort data in Data Classifications first before grouping
<?php
} ?>
Expand All @@ -386,11 +384,11 @@
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
<?php
if (isset($group_data_by_column_index) && $group_data_by_column_index != '') { ?>
if (isset($group_data_by_column_index) && !empty($group_data_by_column_index)) { ?>
api.column(<?php echo $group_data_by_column_index; ?>, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group" id="cambodia-bgcolor"><td colspan="<?php echo count($DATASET_ATTRIBUTE)?>">'+group+'</td></tr>'
'<tr class="group" id="<?php echo odm_country_manager()->get_current_country()?>-bgcolor"><td colspan="<?php echo count($DATASET_ATTRIBUTE)?>">'+group+'</td></tr>'
);
last = group;
}
Expand Down Expand Up @@ -558,14 +556,13 @@ function create_filter_by_column_index(col_index){
$map_layers = get_selected_layers_of_map_by_mapID(get_the_ID());
if (count($map_layers) > 1) {
?>
filterEntriesMap(_.pluck(filtered,mapIdColNumber));
filterEntriesMap(_.pluck(filtered, mapIdColNumber));
<?php
}
?>
}

var filterEntriesMap = function(mapIds){

var mapIdsString = "('" + mapIds.join('\',\'') + "')";
$( "#searchFeature_by_mapID").val(mapIdsString);
$( "#searchFeature_by_mapID").trigger("keyup");
Expand Down
2 changes: 1 addition & 1 deletion post-types/templates/page-profiles-single-page.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php require_once PLUGIN_DIR.'/utils/profile-spreadsheet-post-meta.php'; ?>
<?php require_once WP_PLUGIN_DIR.'/wp-odm_profile_pages/utils/profile-spreadsheet-post-meta.php'; ?>
<div class="container">
<div class="sixteen columns">
<header>
Expand Down
4 changes: 1 addition & 3 deletions wp-odm_profile_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ODM Profile Pages
* Plugin URI: http://github.com/OpenDevelopmentMekong/odm_profile_pages
* Description: Internal wordpress plugin for exposing custom content type for profile pages
* Version: 2.1.7
* Version: 2.1.8
* Author: Alex Corbi ([email protected])
* Author URI: http://www.lifeformapps.com
* License: GPLv3.
Expand All @@ -15,8 +15,6 @@
// Require post types
require_once plugin_dir_path(__FILE__).'post-types/profile-pages.php';

define("PLUGIN_DIR", plugin_dir_path(__FILE__));

if (!class_exists('Odm_Profile_Pages_Plugin')) {

class Odm_Profile_Pages_Plugin
Expand Down

0 comments on commit 24f0e33

Please sign in to comment.