• 
      

    Better support radio inputs in bindProperty and config forms actions.

    Review Request #6160 — Created July 28, 2014 and submitted — Latest diff uploaded

    Information

    Djblets
    release-0.8.x
    34a199c...

    Reviewers

    $.fn.bindProperty() now accepts a radioValue option. If set, this
    will manage standard radio behavior between radio input elements and
    a model property. Each input is expected to have bindProperty() called
    on it, passing a radioValue corresponding to the appropriate value in
    the model's property.

    When the element's property (which is expected to be a boolean) changes
    to true, the model's property will be set to the radioValue. Otherwise,
    to prevent conflicts, nothing will be set on the model (with the
    expectation being that another bindProperty() will handle the radio
    input that's now checked).

    When the model's property changes, the value will be compared against
    the radioValue. If they match, the radio input will be checked.

    The new radio action support for config form list items now support
    taking a radioValue, which is then passed to bindProperty.

    Made use of this in a change to associate multiple radio inputs with a
    single model property. Verified that the element and model always had
    matching states.

    Added new unit tests, which pass.