From aa93b03e1862e9f95570653d52b9d5858171d22f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Nov 2015 03:06:33 -0500 Subject: pull in form data --- StoneIsland/www/js/lib/products/CollectionView.js | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 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 1377277a..490b10fe 100644 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -46,19 +46,20 @@ var CollectionView = ScrollableView.extend({ else { this.data = data } - this.loaded = true - this.$loader.hide() - this.$content.empty() - // DefaultCode10 - data.SearchResponseFull.Results.Items.forEach(function(item){ - this.items[ item['Code8'] ] = item - var t = this.template.replace(/{{image}}/, sdk.image(item['DefaultCode10'], '11_f')) - .replace(/{{code8}}/, item['Code8']) - this.$content.append(t) - }.bind(this)) - - this.deferScrollToTop() + if (! this.loaded) { + this.loaded = true + this.$loader.hide() + this.$content.empty() + // DefaultCode10 + data.SearchResponseFull.Results.Items.forEach(function(item){ + this.items[ item['Code8'] ] = item + var t = this.template.replace(/{{image}}/, sdk.image(item['DefaultCode10'], '11_f')) + .replace(/{{code8}}/, item['Code8']) + this.$content.append(t) + }.bind(this)) + this.deferScrollToTop() + } this.afterFetchCallback && this.afterFetchCallback() }, -- cgit v1.2.3-70-g09d2