Commit 77035e5910570998bca008a4859f1ad63bf03256
- Diff rendering mode:
- inline
- side by side
swtr/static/js/main.js
(10 / 2)
  | |||
722 | 722 | this.render(); | |
723 | 723 | }, | |
724 | 724 | userTagClicked: function(e) { | |
725 | anno.reset(); | ||
725 | 726 | var user = $(e.currentTarget).text(); | |
726 | 727 | var swts = swtr.LDs.filter(function(swt) { | |
727 | 728 | if(swt.get('who') == user) { | |
728 | 729 | return swt; | |
729 | 730 | } | |
730 | 731 | }); | |
731 | swts = _.uniq(swts,'how'.src); | ||
732 | swts = _.uniq(swts, function(swt) { | ||
733 | return swt.get('where'); | ||
734 | }); | ||
732 | 735 | this.setGalleryView(swts); | |
733 | 736 | // $(this.el).hide(); | |
734 | 737 | }, | |
735 | 738 | tagsTagClicked: function(e) { | |
739 | anno.reset(); | ||
736 | 740 | var tag = $(e.currentTarget).text(); | |
737 | 741 | var swts = swtr.LDs.filter(function(swt) { | |
738 | 742 | if(swt.get('how').tags){ | |
… | … | ||
745 | 745 | } | |
746 | 746 | } | |
747 | 747 | }); | |
748 | this.setGalleryView(swts); | ||
748 | swts = _.uniq(swts, function(swt) { | ||
749 | return swt.get('where'); | ||
750 | }); | ||
751 | |||
752 | this.setGalleryView(_.uniq(swts, 'where')); | ||
749 | 753 | // $(this.el).hide(); | |
750 | 754 | }, | |
751 | 755 | setGalleryView: function(swts) { |