Plugin Directory

Changeset 3470902


Ignore:
Timestamp:
02/27/2026 07:59:54 AM (13 days ago)
Author:
plainware
Message:

3.9.68

Location:
locatoraid/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • locatoraid/trunk/locatoraid.php

    r3463159 r3470902  
    44Plugin URI: https://www.locatoraid.com/
    55Description: Store locator plugin
    6 Version: 3.9.67
     6Version: 3.9.68
    77Author: plainware.com
    88Author URI: https://www.locatoraid.com/
     
    1212
    1313if( ! defined('LC3_VERSION') ){
    14     define( 'LC3_VERSION', 3967 );
     14    define( 'LC3_VERSION', 3968 );
    1515}
    1616
  • locatoraid/trunk/modules/front.conf/map/form.php

    r2859421 r3470902  
    3838        }
    3939
     40        $return['front_map:linktolist'] = array(
     41            'input' => $this->app->make('/form/text'),
     42            'label' => __('More info link label', 'locatoraid'),
     43            'help'  => __('On click it will scroll to the results list. Leave blank to hide.', 'locatoraid'),
     44        );
     45
     46
     47        // $return['front_map:linktolist'] = $this->app->make('/form/text');
     48
    4049        return $return;
    4150    }
  • locatoraid/trunk/modules/front.conf/map/view.php

    r2859421 r3470902  
    5454        else {
    5555            $out_inputs = $this->_render_simple( $inputs_view );
     56
     57            $inputs2_view = array('front_map:linktolist' => $inputs_view['front_map:linktolist']);
     58            $out_linktolist = $helper->render_inputs( $inputs2_view );
     59
     60            $out_inputs = $this->app->make('/html/list')
     61                ->set_gutter(2)
     62                ->add($out_inputs)
     63                ->add($out_linktolist)
     64                ;
    5665
    5766            $links
  • locatoraid/trunk/modules/front/_config_settings.php

    r2927304 r3470902  
    5151
    5252$config['settings']['front:show_credits'] = true;
     53$config['settings']['front_map:linktolist'] = '';
  • locatoraid/trunk/modules/front/assets/js/front.js

    r3463159 r3470902  
    543543{
    544544    var html_id = $this.attr('id');
     545    this.html_id = html_id;
    545546    // var $this = jQuery( '#' + html_id );
    546547    var self = this;
    547548    this.observers = new observers;
    548549
    549 console.log($this.data);
     550// console.log($this.data);
    550551
    551552    this.params = {
     
    751752    this.scroll_to = function( id )
    752753    {
    753 
    754754        var ids = Array.isArray(id) ? id : [id];
    755755        var thisId = ids[0];
     
    758758        var new_top = $this.scrollTop() + $container.position().top;
    759759        $this.scrollTop( new_top );
    760     }
     760    }
    761761
    762762    this.highlight = function( id )
     
    776776}
    777777
    778 this.map = function( $this )
     778this.map = function( $this, myList )
    779779// this.map = function( html_id )
    780780{
    781781    var html_id = $this.attr('id');
    782782    // var $this = jQuery( '#' + html_id );
     783    this.html_id = html_id;
    783784    var self = this;
    784785    this.observers = new observers;
     786    this.myList = myList;
    785787    $this.hide();
     788    this.linkToListLabel = $this.data('linktolist-label');
    786789
    787790    self.template = jQuery( '#' + html_id + '_template' ).html();
     
    11251128    {
    11261129        var template = new Hc2Template( self.template );
     1130        var listHtmlId = self.myList.html_id;
    11271131
    11281132        if( Array.isArray(thisId) ){
     
    11381142
    11391143                var templateVars = thisLoc;
     1144                templateVars.linktolist = '<a onclick="document.getElementById(\'' + listHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
     1145
    11401146                var thisLocView = template.render( templateVars );
    11411147
     
    11661172            var thisLoc = self.entries[ thisId ];
    11671173            var templateVars = thisLoc;
     1174            templateVars.linktolist = '<a onclick="document.getElementById(\'' + listHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
     1175
    11681176            var thisLocView = template.render( templateVars );
    11691177
     
    12221230        var form = new self.form( jQuery(forms[ii]) );
    12231231        var list = new self.list( jQuery(lists[ii]) );
    1224         var map = new self.map( jQuery(maps[ii]) );
     1232        var map = new self.map( jQuery(maps[ii]), list );
    12251233
    12261234        form.observers.add( map );
  • locatoraid/trunk/modules/front/view_map.php

    r3134369 r3470902  
    3131        }
    3232
     33        $app_settings = $this->app->make('/app/settings');
     34
     35        $map_attr['data-linktolist-label'] = $app_settings->get('front_map:linktolist');
     36
    3337        foreach( $map_attr as $k => $v ){
    3438            $div
     
    3741        }
    3842
    39         $app_settings = $this->app->make('/app/settings');
    4043        $template = $app_settings->get('front_map:template');
    4144        $template = htmlspecialchars( $template );
  • locatoraid/trunk/modules/front/view_map_template.php

    r3058040 r3470902  
    2222        if( $thisFieldShow ){
    2323            $out[] = '<div class="hc-italic lpr-location-address">{{=address}}</div>';
     24        }
     25
     26        $thisFieldPname = 'front_map:' . 'linktolist';
     27        $thisFieldShow = $app_settings->get( $thisFieldPname );
     28        if( $thisFieldShow ){
     29            $out[] = '<div class="lpr-location-linktolist">{{=linktolist}}</div>';
    2430        }
    2531
  • locatoraid/trunk/readme.txt

    r3463159 r3470902  
    44Tags: dealer locator, geocoding, store locator, location finder, zip code
    55License: GPLv2 or later
    6 Stable tag: 3.9.67
     6Stable tag: 3.9.68
    77Requires at least: 3.3
    88Tested up to: 6.9
     
    8787
    8888== Changelog ==
     89
     90= 3.9.68 =
     91Added an option to add a "Click for more details" link to the map info box that will lead to the respective entry in the results list. It can be helpful if the information in the list is more detailed that the map's info box.
    8992
    9093= 3.9.67 =
Note: See TracChangeset for help on using the changeset viewer.