diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-09 03:06:33 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-09 03:06:33 -0500 |
| commit | aa93b03e1862e9f95570653d52b9d5858171d22f (patch) | |
| tree | 504d136f830ca9ee1dc3c49305216be7e1908efd /StoneIsland/www/js/lib/products/CollectionView.js | |
| parent | 7272a0c913ced4d0f19e81622020051ba2b5c18f (diff) | |
pull in form data
Diffstat (limited to 'StoneIsland/www/js/lib/products/CollectionView.js')
| -rw-r--r-- | StoneIsland/www/js/lib/products/CollectionView.js | 25 |
1 files changed, 13 insertions, 12 deletions
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() }, |
