wip
This commit is contained in:
38
public/web/shella/scripts/section.collection-body.js
Normal file
38
public/web/shella/scripts/section.collection-body.js
Normal file
@@ -0,0 +1,38 @@
|
||||
theme.CollectionBody = (function() {
|
||||
|
||||
function CollectionBody(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.collection-body';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CollectionBody.prototype = $.extend({}, Section.prototype, CollectionBody.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return CollectionBody;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('collection-body', theme.CollectionBody);
|
||||
});
|
||||
Reference in New Issue
Block a user