Ignore:
Timestamp:
May 16, 2013, 6:31:48 AM (11 years ago)
Author:
rvelices
Message:

feature 2885: Add geoip info in the stats / history page

  • use jsonp (cross origin)
  • use localStorage cache
  • use tiptip instead of ui tooltip
File:
1 edited

Legend:

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

    r22664 r22683  
    137137
    138138{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
    139 {combine_script id='jquery.ui.tooltip' load='footer'}
    140139
    141140{footer_script}{literal}
    142 jQuery(".IP").tooltip( {
    143         items: "*",
    144         /*show: {delay:0, effect:"show"},
    145         hide: {delay:50, effect:"hide"},*/
    146         content: function(response) {
    147                 var that = $(this);
    148                 GeoIp.get( that.text(), function(data) {
    149                         response( data.fullName );
     141jQuery(".IP").one( "mouseenter", function(){
     142        var that = $(this);
     143        that
     144                .data("isOver", true)
     145                .one("mouseleave", function() {
     146                        that.removeData("isOver");
    150147                });
    151         }
    152 });
     148        GeoIp.get( that.text(), function(data) {
     149                if (!data.fullName) return;
     150                that.tipTip( {
     151                        content: data.fullName
     152                        }       );
     153                if (that.data("isOver"))
     154                        that.trigger("mouseenter");
     155        });
     156} );
    153157{/literal}{/footer_script}
Note: See TracChangeset for help on using the changeset viewer.