[FIX] website_event: restore country events option

With https://github.com/odoo/odoo/commit/ac8b0fcfc5299b5ea62543b8382cb419fed4868e,
the 'country_events' class was renamed to 'oe_country_events'. This was
done correctly for JS animations and snippets but not for the 'Country
Events' option in the customize menu. This made the option useless.

This commit solves the problem by supporting the two classes (as it
is a stable fix).

closes odoo/odoo#30662
This commit is contained in:
qsm-odoo
2019-01-29 15:50:07 +00:00
parent 4a5862a492
commit cc4d57ff14
@@ -4,11 +4,12 @@ odoo.define('website_event.geolocation', function (require) {
var animation = require('web_editor.snippets.animation');
animation.registry.visitor = animation.Class.extend({
selector: ".oe_country_events",
selector: ".oe_country_events, .country_events",
start: function () {
var self = this;
$.get("/event/get_country_event_list").then(function( data ) {
if(data){
$( ".country_events_list" ).replaceWith( data );
self.$(".country_events_list").replaceWith( data );
}
});
}