Commit e5cfd653267278208f13948ad00fe8f2d6c88060
- Diff rendering mode:
- inline
- side by side
swtr/static/js/main.js
(15 / 1)
  | |||
727 | 727 | }}); | |
728 | 728 | }, | |
729 | 729 | destroy: function() { | |
730 | this.cleanUp(); | ||
730 | 731 | this.remove(); | |
731 | 732 | ||
733 | }, | ||
734 | cleanUp: function() { | ||
735 | if(!$("#tag-cloud").is(':visible')) { | ||
736 | $("#gallery").hide(); | ||
737 | $("#tag-cloud").show(); | ||
738 | } | ||
732 | 739 | } | |
733 | 740 | }); | |
734 | 741 | ||
… | … | ||
867 | 867 | this.render(); | |
868 | 868 | }, | |
869 | 869 | render: function() { | |
870 | $(this.el).html(''); | ||
870 | this.setUp(); | ||
871 | 871 | _.each(this.collection, function(model) { | |
872 | 872 | $(this.el).append(this.template(model.toJSON())); | |
873 | 873 | }, this); | |
874 | }, | ||
875 | setUp: function() { | ||
876 | if(!$(this.el).is(':visible')) { | ||
877 | $(this.el).show(); | ||
878 | } | ||
879 | $(this.el).html(''); | ||
880 | |||
874 | 881 | } | |
875 | 882 | }); | |
876 | 883 |