Avoid a page reload on the review request UI.
Review Request #3389 — Created Oct. 1, 2012 and discarded — Latest diff uploaded
The idea here is to have both discard and draft banners on the window so that by using jQuery we can hide/show the appropriate banner instead of fully re-loading the page.
Note- Testing pertains banners only and it was performed as follows: -Analyse expected behaviour of a review request's state in demo.reviewboard. -Reproduce the review request's state locally making sure it behaves as expected(minus the page reload). * Brand new, not yet published: Discard-Review-Request button: draft-banner and "close" option in the nav bar hide. Discard-banner shows Discard-Review-Request link: draft-banner and "close" option in the nav bar hide. Discard-banner shows. Publish button: draft-banner hides and review-request gets published as expected. * Published and unchanged None of the banners are displayed- as expected. * Published with a change causing a draft Draft-banner is displayed as expected. "ok" button: saves description entered as expected "cancel" button: description entered is discarded as expected "publish changes" button: draft banner hides and request is published as expected. "discard changes" button: draft banner hides and request is discarded as expected. * Discarded discard-banner is displayed as expected. "ok" button: saves description entered as expected "cancel" button: description entered is discarded as expected * Reopened after discarded "reopen for review" button: discard-banner hides, draft-banner is displayed and request becomes a draft. * Submitted submitted-banner is displayed as expected. "ok" button: saves description entered as expected "cancel" button: description entered is discarded as expected * Reopened after submitted -submitted request was previously a draft: "reopen" button hides submitted-banner and displays draft-banner -submitted request was previously public: "reopen" button hides submitted-banner.