Skip to content

Commit

Permalink
2.0.0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Nov 14, 2018
1 parent b31fc9b commit 797d782
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 81 deletions.
46 changes: 24 additions & 22 deletions assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,40 +226,42 @@ function build_map_ajax_search_param(map_canvas, reload_cat_list, catObj, hide_l
}

function geodir_show_sub_cat_collapse_button() {
jQuery('ul.main_list li').each(function(i) {
var sub_cat_list = jQuery(this).find('ul.sub_list');
//alert((typeof sub_cat_list.attr('class') ==='undefined')) ;
if (!(typeof sub_cat_list.attr('class') === 'undefined')) {
if (sub_cat_list.is(':visible')) {
jQuery(this).find('i').removeClass('fa-long-arrow-alt-down');
jQuery(this).find('i').addClass('fa-long-arrow-alt-up');

setTimeout(function(){
jQuery('ul.main_list li').each(function(i) {
var sub_cat_list = jQuery(this).find('ul.sub_list');
if (!(typeof sub_cat_list.attr('class') === 'undefined')) {
if (sub_cat_list.is(':visible')) {
jQuery(this).find('svg').removeClass('fa-long-arrow-alt-down');
jQuery(this).find('svg').addClass('fa-long-arrow-alt-up');
} else {
jQuery(this).find('svg').removeClass('fa-long-arrow-alt-up');
jQuery(this).find('svg').addClass('fa-long-arrow-alt-down');
}
jQuery(this).find('svg').show();
/**/
} else {
jQuery(this).find('i').removeClass('fa-long-arrow-alt-up');
jQuery(this).find('i').addClass('fa-long-arrow-alt-down');
jQuery(this).find('svg').hide();
/**/
}
jQuery(this).find('i').show();
/**/
} else {
jQuery(this).find('i').hide();
/**/
}
});
geodir_activate_collapse_pan();
});
geodir_activate_collapse_pan();
}, 100);
}

function geodir_activate_collapse_pan() {
jQuery('ul.main_list').find('i').click(function() {
jQuery('ul.main_list').find('.gd-map-cat-toggle').unbind('click').click(function() {
jQuery(this)
.parent('li')
.find('ul.sub_list')
.toggle(200,
function() {
if (jQuery(this).is(':visible')) {
jQuery(this).parent('li').find('i').removeClass('fa-long-arrow-alt-down');
jQuery(this).parent('li').find('i').addClass('fa-long-arrow-alt-up');
jQuery(this).parent('li').find('svg').removeClass('fa-long-arrow-alt-down');
jQuery(this).parent('li').find('svg').addClass('fa-long-arrow-alt-up');
} else {
jQuery(this).parent('li').find('i').removeClass('fa-long-arrow-alt-up');
jQuery(this).parent('li').find('i').addClass('fa-long-arrow-alt-down');
jQuery(this).parent('li').find('svg').removeClass('fa-long-arrow-alt-up');
jQuery(this).parent('li').find('svg').addClass('fa-long-arrow-alt-down');
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions assets/js/map.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v2.0.0.35
v2.0.0.36
v1 to v2 conversion instructions improved - UPDATED
Edit add listing page not loading with Beaver Builder - FIXED
Countries table lib checking empty on non variable - FIXED
Expand All @@ -12,6 +12,7 @@ Attachments not updating from revision ID - FIXED
Temp upload files not being deleted immediately - FIXED
Some title and meta SEO %%tags%% not showing - FIXED
No way to change title separator for GD pages title - FIXED
Map child categories show/hide toggle not working - FIXED

v2.0.0.34
Added extra checks for pre_get_posts filters that were breaking some beaver builder template queries - CHANGED
Expand Down
4 changes: 2 additions & 2 deletions geodirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: GeoDirectory
* Plugin URI: https://wpgeodirectory.com/
* Description: GeoDirectory plugin for WordPress.
* Version: 2.0.0.35
* Version: 2.0.0.36
* Author: AyeCode Ltd
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
Expand Down Expand Up @@ -60,7 +60,7 @@ final class GeoDirectory {
*
* @var string
*/
public $version = '2.0.0.35';
public $version = '2.0.0.36';

/**
* GeoDirectory instance.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-geodir-maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public static function get_categories_filter( $post_type, $cat_parent = 0, $hide
$term_check .= ' name="' . $map_canvas . '_cat[]" ';
$term_check .= ' title="' . esc_attr(geodir_utf8_ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas . '\',false, this)">';
$term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . geodir_utf8_ucfirst($cat_term->name) . '"/>';
$out .= '<li>' . $term_check . '<label for="' . $map_canvas.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . geodir_utf8_ucfirst($cat_term->name) . '</label><i class="fas fa-long-arrow-alt-down" aria-hidden="true"></i>';
$out .= '<li>' . $term_check . '<label for="' . $map_canvas.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . geodir_utf8_ucfirst($cat_term->name) . '</label><span class="gd-map-cat-toggle"><i class="fas fa-long-arrow-alt-down" aria-hidden="true" style="display:none"></i></span>';
}

// get sub category by recursion
Expand Down
3 changes: 2 additions & 1 deletion includes/widgets/class-geodir-widget-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ class="inputbox <?php echo( $map_options['search_filter'] ? '' : 'geodir-hide' )
<input type="hidden" id="<?php echo $map_canvas; ?>_cat_enabled" value="1"/>
<div class="geodir_toggle">
<?php echo GeoDir_Maps::get_categories_filter( $map_options['post_type'], 0, true, 0, $map_canvas, absint( $map_options['child_collapse'] ), true ); ?>
<script type="text/javascript">jQuery(function () {
<script type="text/javascript">
jQuery(window).load(function() {
geodir_show_sub_cat_collapse_button('<?php echo $map_canvas; ?>');
});</script>
</div>
Expand Down
Binary file modified languages/geodirectory-en_US.mo
Binary file not shown.
Loading

0 comments on commit 797d782

Please sign in to comment.