From 0b40e1e779719b68e29193d10cb13a18deb46a1e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 28 Jan 2016 18:40:45 +0100 Subject: fix video bug and show/hide filter --- StoneIsland/www/js/lib/products/CollectionView.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js/lib/products/CollectionView.js') diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index a3b32988..033992a6 100755 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -33,7 +33,12 @@ var CollectionView = ScrollableView.extend({ if (sdk.env !== "test" && app.closed.storeIsClosed) { return app.closed.show() } - app.footer.show("FILTER") + if (this.data && this.data.SearchResponseFull.Results.Items.length == 1) { + app.footer.hide() + } + else { + app.footer.show("FILTER") + } document.body.className = "collection" if (this.loaded) { console.log("collection this loaded") @@ -83,8 +88,16 @@ var CollectionView = ScrollableView.extend({ this.$loader.hide() this.$content.empty() // DefaultCode10 -// data.SearchResponseFull.Results.Items.length = 1 + data.SearchResponseFull.Results.Items.length = 1 this.$content.toggleClass("single", (data.SearchResponseFull.Results.Items.length == 1)) + + if (data.SearchResponseFull.Results.Items.length == 1) { + app.footer.hide() + } + else { + app.footer.show("FILTER") + } + data.SearchResponseFull.Results.Items.forEach(this.append.bind(this)) this.deferScrollToTop() } -- cgit v1.2.3-70-g09d2