diff options
| author | Dharmraj Jhala (OpenERP) <dizzy.zala@gmail.com> | 2014-03-18 18:39:03 +0530 |
|---|---|---|
| committer | Dharmraj Jhala (OpenERP) <dizzy.zala@gmail.com> | 2014-03-18 18:39:03 +0530 |
| commit | ac8b0fcfc5299b5ea62543b8382cb419fed4868e (patch) | |
| tree | 9620641030af44783ca8ab1cf8941de170e9fdec /addons/website_event/static/src/js/website_geolocation.js | |
| parent | 3566b69374c941cc5c48097af867b3bf7dc8dc05 (diff) | |
[IMP] improved code as suggested
bzr revid: dizzy.zala@gmail.com-20140318130903-6u2t94bfvh98jby7
Diffstat (limited to 'addons/website_event/static/src/js/website_geolocation.js')
| -rw-r--r-- | addons/website_event/static/src/js/website_geolocation.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/addons/website_event/static/src/js/website_geolocation.js b/addons/website_event/static/src/js/website_geolocation.js index d295f3dd04d..02eb977228a 100644 --- a/addons/website_event/static/src/js/website_geolocation.js +++ b/addons/website_event/static/src/js/website_geolocation.js @@ -1,16 +1,16 @@ (function() { "use strict"; - function getLocation(){ - $.post( "/event/get_country_event_list/", function( data ) { - if(data){ - $( ".country_events_list" ).replaceWith( data ); - } - }); - } + var website = openerp.website; - $(document).ready(function () { - if($('.country_events').length){ - getLocation(); + website.snippet.animationRegistry.visitor = website.snippet.Animation.extend({ + selector: ".oe_country_events", + start: function () { + var self = this; + $.post( "/event/get_country_event_list/", function( data ) { + if(data){ + $( ".country_events_list" ).replaceWith( data ); + } + }); } }); })();
\ No newline at end of file |
