change inlineEditor() so it can be enabled/disabled

Review Request #3560 — Created Nov. 25, 2012 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

The purpose of this change is to allow enabling/disabling of the '.editable' fields of a review request.
Note: 
-testing was performed in latest version of Chrome and Firefox.
-testing was performed with input in all of the fields as well as in none of the fields.

Expected behaviour: 
Review request fields should be disabled when the review request is in a non-editable state(submitted/discarded)
Review request fields should be enabled when the review request is in a editable state(draft/public)

* Brand new, not yet published:
discard-review-request button: review request fields cleared and disabled as expected.
discard-review-request link: review request fields cleared and disabled as expected.
Publish: review request fields remain enabled as expected.

* Published and unchanged:
close-discarded-review-request link: review request fields are disabled and set to the upstream review request.
close-submitted-review request link: '.editable' fields are disabled and set to the upstream review request.

* Discarded:
close-discarded-review-request link: '.editable' fields are disabled and set to the upstream review request.

* Reopened after discarded:
review request fields are enabled as expected. 

* Submitted:
close-submitted-review request link: '.editable' fields are disabled and set to the upstream review request.

* Reopened after submitted:
review request fields are enabled and set to the upstream review request. Behaves as expected for requests that were submitted as drafts as well as public.