Plugin Directory

Changeset 3470908


Ignore:
Timestamp:
02/27/2026 08:15:36 AM (13 days ago)
Author:
plainware
Message:

updated front end javascript to make it work correctly if the results list was set to auto height

File:
1 edited

Legend:

Unmodified
Added
Removed
  • locatoraid/trunk/modules/front/assets/js/front.js

    r3470902 r3470908  
    709709
    710710                // var $this_loc_view = jQuery( this_loc_view );
     711
     712                var thisLocHtmlId = this.html_id + '-' + this_loc['id'];
    711713                var $thisLocView = jQuery('<div>').html( this_loc_view );
    712714                $thisLocView
    713715                    .data( 'location-id', this_loc['id'] )
    714716                    .data( 'location', this_loc )
     717                    .attr('id', thisLocHtmlId)
    715718                    ;
    716719
     
    11421145
    11431146                var templateVars = thisLoc;
    1144                 templateVars.linktolist = '<a onclick="document.getElementById(\'' + listHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
     1147                var thisLocHtmlId = listHtmlId + '-' + thisThisId;
     1148                templateVars.linktolist = '<a onclick="document.getElementById(\'' + thisLocHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
    11451149
    11461150                var thisLocView = template.render( templateVars );
     
    11721176            var thisLoc = self.entries[ thisId ];
    11731177            var templateVars = thisLoc;
    1174             templateVars.linktolist = '<a onclick="document.getElementById(\'' + listHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
     1178
     1179            var thisLocHtmlId = listHtmlId + '-' + thisThisId;
     1180            templateVars.linktolist = '<a onclick="document.getElementById(\'' + thisLocHtmlId + '\').scrollIntoView(); return false;">' + this.linkToListLabel + '</a>';
    11751181
    11761182            var thisLocView = template.render( templateVars );
Note: See TracChangeset for help on using the changeset viewer.