diff --git a/control/content/index.html b/control/content/index.html index df2d8f8..92631c8 100644 --- a/control/content/index.html +++ b/control/content/index.html @@ -12,10 +12,10 @@ - + - + diff --git a/widget/controllers/widget.home.controller.js b/widget/controllers/widget.home.controller.js index ffce767..1b3d8ad 100644 --- a/widget/controllers/widget.home.controller.js +++ b/widget/controllers/widget.home.controller.js @@ -12,17 +12,21 @@ WidgetHome.view = null; //Refresh data on pulling the tile bar - + function initCarousel(carouselImages){ + var carouselContainer = document.getElementById("carousel"); + var carousel = new buildfire.components.carousel.view({ + selector: carouselContainer, + items: carouselImages, + speed: 1000 + }); + } buildfire.datastore.onRefresh(function () { init(function (err) { if (!err) { - if (!WidgetHome.view) { - WidgetHome.view = new Buildfire.components.carousel.view("#carousel", []); - } + if (WidgetHome.data.content && WidgetHome.data.content.carouselImages) { - WidgetHome.view.loadItems(WidgetHome.data.content.carouselImages); - } else { - WidgetHome.view.loadItems([]); + initCarousel(WidgetHome.data.content.carouselImages); + } } }); @@ -143,13 +147,8 @@ init(function(){}); $scope.$on('$viewContentLoaded', function () { $rootScope.$on("Carousel:LOADED", function () { - if (!WidgetHome.view) { - WidgetHome.view = new Buildfire.components.carousel.view("#carousel", []); - } if (WidgetHome.data.content && WidgetHome.data.content.carouselImages) { - WidgetHome.view.loadItems(WidgetHome.data.content.carouselImages); - } else { - WidgetHome.view.loadItems([]); + initCarousel(WidgetHome.data.content.carouselImages); } }); }); @@ -178,8 +177,8 @@ WidgetHome.view = null; } else { - if (WidgetHome.view) { - WidgetHome.view.loadItems(WidgetHome.data.content.carouselImages); + { + initCarousel(WidgetHome.data.content.carouselImages); } } currentListLayout = WidgetHome.data.design.listLayout; diff --git a/widget/css/widget.app.css b/widget/css/widget.app.css index fd04379..79d7a1e 100644 --- a/widget/css/widget.app.css +++ b/widget/css/widget.app.css @@ -46,10 +46,14 @@ height: 100%; } -.owl-carousel .owl-controls .owl-dots { - text-align: center; -} +#carousel { + width: 100%; + min-width:100%; + max-height: 56vw; + min-height: 56vw; + overflow-y: hidden; +} .mapSize{ height: 192px; } diff --git a/widget/index.html b/widget/index.html index 8880611..64a2749 100644 --- a/widget/index.html +++ b/widget/index.html @@ -2,21 +2,18 @@
- + - - - - + + + diff --git a/widget/templates/Layout_1.html b/widget/templates/Layout_1.html index 0a98a2f..bf0f45c 100644 --- a/widget/templates/Layout_1.html +++ b/widget/templates/Layout_1.html @@ -1,7 +1,7 @@