aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/history.tpl
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-05-16 04:31:48 +0000
committerrvelices <rv-github@modusoptimus.com>2013-05-16 04:31:48 +0000
commit42bdfe8c8da23aba61c43b74b484849b48b3d25c (patch)
tree93d5adbf80a9e310519937de3bfffab822c02532 /admin/themes/default/template/history.tpl
parent237a642dda08ae6057355fdd377fe8dca9cc25d8 (diff)
feature 2885: Add geoip info in the stats / history page
- use jsonp (cross origin) - use localStorage cache - use tiptip instead of ui tooltip git-svn-id: http://piwigo.org/svn/trunk@22683 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template/history.tpl')
-rw-r--r--admin/themes/default/template/history.tpl26
1 files changed, 15 insertions, 11 deletions
diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl
index fa0f49e1d..5c4d1a1a7 100644
--- a/admin/themes/default/template/history.tpl
+++ b/admin/themes/default/template/history.tpl
@@ -136,18 +136,22 @@
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
-{combine_script id='jquery.ui.tooltip' load='footer'}
{footer_script}{literal}
-jQuery(".IP").tooltip( {
- items: "*",
- /*show: {delay:0, effect:"show"},
- hide: {delay:50, effect:"hide"},*/
- content: function(response) {
- var that = $(this);
- GeoIp.get( that.text(), function(data) {
- response( data.fullName );
+jQuery(".IP").one( "mouseenter", function(){
+ var that = $(this);
+ that
+ .data("isOver", true)
+ .one("mouseleave", function() {
+ that.removeData("isOver");
});
- }
-});
+ GeoIp.get( that.text(), function(data) {
+ if (!data.fullName) return;
+ that.tipTip( {
+ content: data.fullName
+ } );
+ if (that.data("isOver"))
+ that.trigger("mouseenter");
+ });
+} );
{/literal}{/footer_script} \ No newline at end of file