chipx86 got a fish trophy!
Move the review banner code out into a DraftReviewBannerView.
Review Request #4114 — Created May 8, 2013 and submitted
Move the review banner code out into a DraftReviewBannerView. DraftReviewBannerView handles showing/hiding the banner in response to events on the draft review, and handles the buttons on the banner. DraftReviewBannerView is a singleton. It's created once up-front. Callers can access the instance through RB.DraftReviewBannerView.instance in order to show or hide the banner.
Manually tested all buttons, and various events that show the banner. Unit tests pass.
-
-
reviewboard/static/rb/js/views/draftReviewBannerView.js (Diff revision 1) So the more I encounter this sort of thing, the more I think it should be: this.$el .slideDown(); this.$el.find('.banner') .hide() .slideDown();