Commit d791bfa1fcf0943ce35de072005af9e0e729944e
Show all tags for images in galleryview in linked data page.
| | | | 675 | return swt.get('where'); | 675 | return swt.get('where'); |
---|
676 | }); | 676 | }); |
---|
677 | | 677 | |
---|
678 | this.setGalleryView(_.uniq(swts, 'where')); | | this.setGalleryView(_.uniq(swts, 'where')); |
---|
| | 678 | // this.setGalleryView(_.uniq(swts, 'where')); | | | 679 | this.setGalleryView(swts); |
---|
679 | // $(this.el).hide(); | 680 | // $(this.el).hide(); |
---|
680 | }, | 681 | }, |
---|
681 | setGalleryView: function(swts) { | 682 | setGalleryView: function(swts) { |
---|
… | | … | |
---|
732 | render: function() { | 732 | render: function() { |
---|
733 | this.setUp(); | 733 | this.setUp(); |
---|
734 | _.each(this.collection, function(model) { | 734 | _.each(this.collection, function(model) { |
---|
735 | $(this.el).append(this.template(model.toJSON())); | | $(this.el).append(this.template(model.toJSON())); |
---|
| | 735 | var models = swtr.LDs.filter(function(swt) { | | | 736 | if(swt.get('how').src == model.get('how').src) { |
---|
| | 737 | return model; |
---|
| | 738 | } |
---|
| | 739 | }); |
---|
| | 740 | var tags = []; |
---|
| | 741 | _.each(models, function(model) { |
---|
| | 742 | if(model.get('how').tags) { |
---|
| | 743 | tags.push(model.get('how').tags); |
---|
| | 744 | } |
---|
| | 745 | }); |
---|
| | 746 | tags = _.flatten(tags); |
---|
| | 747 | $(this.el).append(this.template({'how':{'tags': tags, |
---|
| | 748 | 'src':model.get('how').src}, |
---|
| | 749 | 'who':model.get('who')})); |
---|
736 | }, this); | 750 | }, this); |
---|
737 | $('html, body').animate({ | 751 | $('html, body').animate({ |
---|
738 | scrollTop: $("#gallery").offset().top | 752 | scrollTop: $("#gallery").offset().top |
---|