Changeset 2241294
- Timestamp:
- 02/09/2020 02:21:03 PM (6 years ago)
- Location:
- locatoraid/trunk
- Files:
-
- 13 edited
-
config/_common.php (modified) (1 diff)
-
happ2/assets/css/hc.css (modified) (1 diff)
-
happ2/modules/app/_config_after.php (modified) (1 diff)
-
happ2/modules/http/uri.php (modified) (1 diff)
-
locatoraid.php (modified) (2 diffs)
-
modules/front.conf/_config_after.php (modified) (1 diff)
-
modules/front/_config_settings.php (modified) (1 diff)
-
modules/front/assets/js/front.js (modified) (4 diffs)
-
modules/front/view.php (modified) (2 diffs)
-
modules/front/view_form.php (modified) (4 diffs)
-
modules/locations/presenter.php (modified) (1 diff)
-
modules/publish.wordpress/view.html.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
locatoraid/trunk/config/_common.php
r2214861 r2241294 1 1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly 2 $config['app_version'] = '3.7. 0';2 $config['app_version'] = '3.7.1'; 3 3 // $config['dbprefix_version'] = 'v1'; 4 4 -
locatoraid/trunk/happ2/assets/css/hc.css
r1769456 r2241294 765 765 766 766 #hclc_map img {max-width: none !important;} 767 768 @media (max-width: 48em) { 769 .hc-lg-flex-auto-grid.hc-lg-mxn2 > div {margin-top:.5em;} 770 .hc-lg-flex-auto-grid.hc-lg-mxn2 > div:first-child {margin-top:0;} 771 } 772 773 #locatoraid-search-radius-select-container select { 774 width: 100%; 775 } 776 777 @media (min-width: 48em) { 778 .hc-lg-mxn2 { margin-left: -.5rem; margin-right: -.5rem; } 779 .hc-lg-px2 { padding-left: .5em; padding-right: .5em } 780 .hc-lg-align-center { text-align: center } 781 782 .hc-lg-flex-auto-grid { 783 display: flex; 784 flex-direction: row; 785 justify-content: space-around; 786 flex-wrap: nowrap; 787 align-items: center; 788 vertical-align: middle; 789 /* align-items: flex-start; */ 790 } 791 .hc-lg-flex-auto-grid > div { 792 white-space: nowrap; overflow: hidden; width: 100%; 793 } 794 795 #locatoraid-search-radius-select-container { 796 width: 6em; 797 } 798 } -
locatoraid/trunk/happ2/modules/app/_config_after.php
r1970559 r2241294 2 2 $config['after']['/app/enqueuer'][] = function( $app, $enqueuer ) 3 3 { 4 $ver = defined( 'LC3_VERSION' ) ? LC3_VERSION : 2; 5 4 6 $enqueuer 5 ->register_script( 'hc', 'happ2/assets/js/hc2.js ')7 ->register_script( 'hc', 'happ2/assets/js/hc2.js?hcver=' . $ver ) 6 8 7 ->register_style( 'hc-start', 'happ2/assets/css/hc-start.css ')8 ->register_style( 'hc', 'happ2/assets/css/hc.css ')9 ->register_style( 'hc-start', 'happ2/assets/css/hc-start.css?hcver=' . $ver ) 10 ->register_style( 'hc', 'happ2/assets/css/hc.css?hcver=' . $ver ) 9 11 ->register_style( 'font', 'https://fonts.googleapis.com/css?family=PT+Sans' ) 10 12 ; -
locatoraid/trunk/happ2/modules/http/uri.php
r2209033 r2241294 105 105 if( isset($base_params[$this->hca]) ){ 106 106 $hca = $base_params[$this->hca]; 107 $hca = sanitize_text_field( $hca ); 107 108 108 109 list( $slug, $params ) = $this->get_slug_and_params( $hca ); 110 109 111 $return['slug'] = $slug; 110 112 $return['raw_params'] = $params; -
locatoraid/trunk/locatoraid.php
r2214861 r2241294 4 4 Plugin URI: https://www.locatoraid.com/ 5 5 Description: Store locator plugin 6 Version: 3.7. 06 Version: 3.7.1 7 7 Author: hitcode.com 8 8 Author URI: https://www.locatoraid.com/ … … 12 12 13 13 if( ! defined('LC3_VERSION') ){ 14 define( 'LC3_VERSION', 37 0);14 define( 'LC3_VERSION', 371 ); 15 15 } 16 16 -
locatoraid/trunk/modules/front.conf/_config_after.php
r1807089 r2241294 11 11 ), 12 12 'label' => HCM::__('Measure Units'), 13 ); 14 $return['front:links_new_window'] = array( 15 'input' => $app->make('/form/checkbox') 16 , 17 'label' => HCM::__('Open Links In New Window'), 13 18 ); 14 19 return $return; -
locatoraid/trunk/modules/front/_config_settings.php
r2143317 r2241294 1 1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly 2 2 $config['settings']['core:measure'] = 'mi'; 3 $config['settings']['front:links_new_window'] = 1; 3 4 4 5 $config['settings']['fields:name:use'] = TRUE; -
locatoraid/trunk/modules/front/assets/js/front.js
r2214861 r2241294 202 202 search_url += encodeURIComponent( '/product2/' + replace_to ); 203 203 } 204 205 if( 'radius' == k ){ 206 search_url += encodeURIComponent( '/radius/' + replace_to ); 207 } 204 208 } 205 209 … … 210 214 search_string = search_string + ' ' + where; 211 215 } 216 217 console.log( search ); 218 console.log( search_url ); 219 // return; 212 220 213 221 if( ! search_string.length ){ … … 336 344 } 337 345 338 var radius_search_url = $this.data('radius-link'); 339 var search_string = this_data.search; 340 search_string = search_string + ''; 341 342 if( search_string.length && radius_search_url.length ){ 343 self.radius_search( this_data ); 346 if( this_data.hasOwnProperty('radius') ){ 347 self.search( this_data ); 344 348 } 345 349 else { 346 self.search( this_data ); 350 var radius_search_url = $this.data('radius-link'); 351 var search_string = this_data.search; 352 search_string = search_string + ''; 353 354 if( search_string.length && radius_search_url.length ){ 355 self.radius_search( this_data ); 356 } 357 else { 358 self.search( this_data ); 359 } 347 360 } 348 361 } … … 350 363 $this.on('submit', this.submit ); 351 364 $this.find("input[type='checkbox']").on('change', this.submit ); 365 $this.find("select").on('change', this.submit ); 352 366 353 367 // var default_search = $this.find('input[name=hc-search]').val(); -
locatoraid/trunk/modules/front/view.php
r2214861 r2241294 11 11 12 12 $enqueuer 13 ->register_script( 'hc', 'happ2/assets/js/hc2.js ')14 ->register_style( 'hc', 'happ2/assets/css/hc.css ')13 ->register_script( 'hc', 'happ2/assets/js/hc2.js?hcver=' . LC3_VERSION ) 14 ->register_style( 'hc', 'happ2/assets/css/hc.css?hcver=' . LC3_VERSION ) 15 15 ; 16 16 … … 81 81 'search-bias-country' => '', // australia, uk, finland etc 82 82 'radius' => '10, 25, 50, 100, 200, 500', 83 'radius-select' => 0, 83 84 'id' => NULL, 84 85 'clustering' => 0, -
locatoraid/trunk/modules/front/view_form.php
r2209033 r2241294 36 36 } 37 37 38 // radius select 39 if( isset($params['radius-select']) && $params['radius-select'] ){ 40 if( isset($params['radius']) && (count($params['radius']) > 1) ){ 41 $radiusOptions = array(); 42 // $radiusOptions[ 0 ] = HCM::__('Radius'); 43 $measure = $app_settings->get('core:measure'); 44 foreach( $params['radius'] as $e ){ 45 $radiusOptions[ $e ] = $e . ' ' . $measure; 46 } 47 48 $radiusSelect = $this->app->make('/form/select') 49 ->set_options( $radiusOptions ) 50 ->render( 'radius', current($params['radius']) ) 51 ->add_attr('class', 'hcj2-radius-select') 52 ->add_attr('id', 'locatoraid-search-radius-select') 53 ; 54 55 $form_inputs['radius'] = $radiusSelect; 56 } 57 } 58 38 59 $form_values = array(); 39 60 if( isset($params['start']) && ($params['start'] != 'no') ){ … … 59 80 $link_params['limit'] = $params['limit']; 60 81 } 61 if( isset($params['radius']) && (count($params['radius']) <= 1) ){ 62 $link_params['radius'] = $params['radius']; 82 if( ! isset($form_inputs['radius']) ){ 83 if( isset($params['radius']) && (count($params['radius']) <= 1) ){ 84 $link_params['radius'] = $params['radius']; 85 } 63 86 } 64 87 if( isset($params['sort']) ){ … … 94 117 // radius link which will give us links to results 95 118 $radius_link = ''; 96 if( isset($params['radius']) && (count($params['radius']) > 1) ){ 97 $radius_link_params = $link_params; 98 99 $radius_link_params['radius'] = $params['radius']; 100 unset( $radius_link_params['sort'] ); 101 // unset( $radius_link_params['limit'] ); 102 103 $radius_link = $this->app->make('/http/uri') 104 ->mode('api') 105 ->url('/search/radius', $radius_link_params ) 106 ; 119 if( ! isset($form_inputs['radius']) ){ 120 if( isset($params['radius']) && (count($params['radius']) > 1) ){ 121 $radius_link_params = $link_params; 122 123 $radius_link_params['radius'] = $params['radius']; 124 unset( $radius_link_params['sort'] ); 125 // unset( $radius_link_params['limit'] ); 126 127 $radius_link = $this->app->make('/http/uri') 128 ->mode('api') 129 ->url('/search/radius', $radius_link_params ) 130 ; 131 } 107 132 } 108 133 … … 151 176 ->set_gutter(2) 152 177 ; 178 179 if( isset($inputs_view['radius']) ){ 180 $inputs_view['search'] = '<div class="hc-lg-flex-auto-grid hc-lg-mxn2"><div class="hc-lg-px2">' . $inputs_view['search'] . '</div><div class="hc-lg-px2 hc-lg-align-center" id="locatoraid-search-radius-select-container">' . $inputs_view['radius'] . '</div></div>'; 181 unset( $inputs_view['radius'] ); 182 } 183 153 184 foreach( $inputs_view as $k => $input ){ 154 185 $input_view = $this->app->make('/html/element')->tag('div') -
locatoraid/trunk/modules/locations/presenter.php
r2214861 r2241294 198 198 $this_label = strlen($this_label) ? $this_label : $value; 199 199 200 $return = '<a href="' . $href . '" target="_blank">' . $this_label . '</a>'; 200 $newWindow = $app_settings->get( 'front:links_new_window' ); 201 202 $return = '<a href="' . $href . '"'; 203 if( $newWindow ){ 204 $return .= ' target="_blank"'; 205 } 206 $return .= '>' . $this_label . '</a>'; 207 208 201 209 break; 202 210 -
locatoraid/trunk/modules/publish.wordpress/view.html.php
r2106597 r2241294 188 188 </li> 189 189 190 191 190 <li class="hc-mt3"> 192 191 <h3 class="hc-underline">radius</h3> … … 207 206 208 207 <li class="hc-mt3"> 208 <h3 class="hc-underline">radius-select</h3> 209 <ul class="hc-ml3"> 210 <li> 211 <?php echo HCM::__('Displays a drop-down list to select a search radius option. Set to 1 to show, 0 to hide.'); ?> 212 </li> 213 <li> 214 <?php echo HCM::__('Default'); ?>: <em>0</em> 215 </li> 216 <li class="hc-p2"> 217 <code class="hc-p2"> 218 [<?php echo $tag; ?> radius-select="1"] 219 </code> 220 </li> 221 </ul> 222 </li> 223 224 225 <li class="hc-mt3"> 209 226 <h3 class="hc-underline">group</h3> 210 227 <ul class="hc-ml3"> -
locatoraid/trunk/readme.txt
r2214861 r2241294 85 85 == Changelog == 86 86 87 = 3.7.1 = 88 * Added a shortcode parameter if to display the search radius drop down box. 89 * Added a setting if to open links in a new window. 90 87 91 = 3.7.0 = 88 92 * Added a setting to define a default map pin for locations.
Note: See TracChangeset
for help on using the changeset viewer.