Ignore:
Timestamp:
May 16, 2013, 10:46:21 PM (11 years ago)
Author:
rvelices
Message:

feature 2885: Add geoip info in the stats / history page - fixes and add a location map image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/history.tpl

    r22683 r22703  
    139139
    140140{footer_script}{literal}
     141jQuery(document).ready( function(){
    141142jQuery(".IP").one( "mouseenter", function(){
    142143        var that = $(this);
     
    148149        GeoIp.get( that.text(), function(data) {
    149150                if (!data.fullName) return;
     151                var content = data.fullName;
     152                if (data.latitude && data.region_name) {
     153                        content += "<br><img width=300 height=220 src=\"http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=300x220&zoom=6"
     154                                + "&markers=size:tiny%7C" + data.latitude + "," + data.longitude
     155                                + "\">";
     156                }
    150157                that.tipTip( {
    151                         content: data.fullName
     158                        content: content,
     159                        maxWidth: 320
    152160                        }       );
    153161                if (that.data("isOver"))
     
    155163        });
    156164} );
     165});
    157166{/literal}{/footer_script}
Note: See TracChangeset for help on using the changeset viewer.