Skip to content
Permalink
Browse files

[MERGE] forward port branch 11.0 up to b59369d

  • Loading branch information...
KangOl committed Aug 12, 2019
2 parents 7321c8e + b59369d commit 76a52bdbfbcfe1fc9411e09c122711ce3a102809
Showing with 11 additions and 1 deletion.
  1. +11 −1 addons/website_event/static/src/js/website_geolocation.js
@@ -12,12 +12,22 @@ sAnimation.registry.visitor = sAnimation.Class.extend({
start: function () {
var defs = [this._super.apply(this, arguments)];
var self = this;
var $eventList = this.$('.country_events_list');
this._originalContent = $eventList[0].outerHTML;
defs.push(this._rpc({route: '/event/get_country_event_list'}).then(function (data) {
if (data) {
self.$('.country_events_list').replaceWith(data);
self._$loadedContent = $(data);
$eventList.replaceWith(self._$loadedContent);
}
}));
return $.when.apply($, defs);
},
/**
* @override
*/
destroy: function () {
this._super.apply(this, arguments);
this._$loadedContent.replaceWith(this._originalContent);
},
});
});

0 comments on commit 76a52bd

Please sign in to comment.
You can’t perform that action at this time.