Skip to content

Commit

Permalink
Initialize carousel tile after drop content
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Sep 29, 2018
1 parent 9193e95 commit 685afdc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webpack/app/js/contentchooser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import CarouselTile from './tiles/carousel.js';


export default class ContentChooser {
constructor(parent) {
this.parent = parent;
Expand Down Expand Up @@ -143,6 +146,9 @@ export default class ContentChooser {
$origin.removeAttr('data-content-type');
}
move_callback();
if ($target.attr('data-tile-type') === 'collective.cover.carousel') {
new CarouselTile($target);
}
return false;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
Expand Down Expand Up @@ -175,6 +181,9 @@ export default class ContentChooser {
}
$target.find('.loading-mask').removeClass('show');
self.parent.update();
if ($target.attr('data-tile-type') === 'collective.cover.carousel') {
new CarouselTile($target);
}
return false;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
Expand Down

0 comments on commit 685afdc

Please sign in to comment.