[MERGE] forward port branch 11.0 up to b59369d1e6
This commit is contained in:
@@ -12,12 +12,22 @@ sAnimation.registry.visitor = sAnimation.Class.extend({
|
|||||||
start: function () {
|
start: function () {
|
||||||
var defs = [this._super.apply(this, arguments)];
|
var defs = [this._super.apply(this, arguments)];
|
||||||
var self = this;
|
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) {
|
defs.push(this._rpc({route: '/event/get_country_event_list'}).then(function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
self.$('.country_events_list').replaceWith(data);
|
self._$loadedContent = $(data);
|
||||||
|
$eventList.replaceWith(self._$loadedContent);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
return $.when.apply($, defs);
|
return $.when.apply($, defs);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
destroy: function () {
|
||||||
|
this._super.apply(this, arguments);
|
||||||
|
this._$loadedContent.replaceWith(this._originalContent);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user