diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-11-01 23:17:37 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-11-01 23:20:12 +0300 |
commit | 5f6b01e086a012b401f09e19224f3942912289df (patch) | |
tree | 636a28c5023ec54a9f484f3a487785a22a3481cf /app | |
parent | 80c088817620b50a59eb9581e6bfd8da04da4e5a (diff) | |
parent | 35c254c88c086bd457b642b9e517625174026548 (diff) |
Merge pull request #8404 from Flaburgan/8118-scrolling-photos
Do not recreate blueimp each time you're scrolling in the photos page
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/app/views/photos_view.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/assets/javascripts/app/views/photos_view.js b/app/assets/javascripts/app/views/photos_view.js index 7390a357c..14d484dd9 100644 --- a/app/assets/javascripts/app/views/photos_view.js +++ b/app/assets/javascripts/app/views/photos_view.js @@ -2,23 +2,16 @@ app.views.Photos = app.views.InfScroll.extend({ className: "clearfix row", - postClass : app.views.Photo, initialize : function() { this.stream = this.model; this.collection = this.stream.items; + new app.views.Gallery({el: this.$el}); // viable for extraction this.stream.fetch(); this.setupInfiniteScroll(); - }, - - postRenderTemplate: function(){ - var photoAttachments = $("#main-stream > div"); - if(photoAttachments.length > 0) { - new app.views.Gallery({ el: photoAttachments }); - } } }); // @license-end |