Changeset 22715
- Timestamp:
- May 17, 2013, 1:07:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/history.tpl
r22703 r22715 139 139 140 140 {footer_script}{literal} 141 jQuery(document).ready( function(){142 141 jQuery(".IP").one( "mouseenter", function(){ 143 142 var that = $(this); … … 149 148 GeoIp.get( that.text(), function(data) { 150 149 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 } 150 151 var content = data.fullName; 152 if (data.latitude && data.region_name) { 153 content += '<br><a class="ipGeoOpen" data-lat="'+data.latitude+'" data-lon="'+data.longitude+'"'; 154 content += ' href="#">show on a Google Map</a>'; 155 } 156 157 157 that.tipTip( { 158 158 content: content, 159 maxWidth: 320 159 keepAlive: true, 160 defaultPosition: "right", 161 maxWidth: 320, 160 162 } ); 161 163 if (that.data("isOver")) … … 163 165 }); 164 166 } ); 167 168 jQuery(document).on('click', '.ipGeoOpen', function() { 169 var lat = jQuery(this).data("lat"); 170 var lon = jQuery(this).data("lon"); 171 var parent = jQuery(this).parent(); 172 jQuery(this).remove(); 173 174 var append = '<br><img width=300 height=220 src="http://maps.googleapis.com/maps/api/staticmap'; 175 append += '?sensor=false&size=300x220&zoom=6&markers=size:tiny%7C' + lat + ',' + lon + '">'; 176 177 jQuery(parent).append(append); 178 return false; 165 179 }); 166 180 {/literal}{/footer_script}
Note: See TracChangeset
for help on using the changeset viewer.