Merge lp:~abentley/launchpad/spec-creation-js into lp:launchpad

Proposed by Aaron Bentley on 2012-09-18
Status: Merged
Approved by: Aaron Bentley on 2012-09-19
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~abentley/launchpad/spec-creation-js
Merge into: lp:launchpad
Diff against target: 0 lines
To merge this branch: bzr merge lp:~abentley/launchpad/spec-creation-js
Reviewer Review Type Date Requested Status
Deryck Hodge (community) 2012-09-18 Approve on 2012-09-19
Review via email: mp+125038@code.launchpad.net

Commit Message

Use pretty widget for selecting information-type creating blueprints.

Description of the Change

= Summary =
Selecting information_type during Specification creation uses the pretty widget.

== Pre-implementation notes ==
None

== LOC Rationale ==
Part of Private Projects

== Implementation details ==
In order to use addPopupChoiceForRadioButtons, the list of information_types must be available. This required each NewSpecification view to provide self.info_types, which duplicated info_type_field logic. Also, schema had a lot of duplicate logic. So it was folded into self.append_info_type_field.

In order to invoke lp.blueprints.addspec.dom_ready(), generic-edit.pt had to be replaced with addspec.pt. (We should look at generalizing this later, perhaps.)

== Tests ==
bin/test test_specification
xvfb-run bin/test --layer=YUITestLayer

== Demo and Q/A ==
Go to all the specification creation screens. On Product and ProductSeries, if multiple values are permitted, the widget should be shown, listing only the values permitted by the policy. On Distro and DistroSeries, the widget should not shown. From the home page and the meeting page, PUBLIC, PROPRIETARY and EMBARGOED should be shown.

On submit, the value selected from the picker should be honoured.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/blueprints/javascript/tests/test_addspec.js
  lib/lp/app/javascript/choice.js
  lib/lp/blueprints/javascript/tests/test_addspec.html
  lib/lp/blueprints/javascript/addspec.js
  lib/lp/blueprints/templates/addspec.pt
  lib/lp/blueprints/browser/configure.zcml
  lib/lp/blueprints/browser/specification.py
  lib/lp/blueprints/browser/tests/test_specification.py

To post a comment you must log in.
Deryck Hodge (deryck) wrote :

Thanks, Aaron. Looks good to me. I really appreciate you cleaning up those odd lines where SpecificationSharingPolicy ran long.

FWIW, I'd prefer a different name to the js function that sets up the page. Something like init_popups, init_page, or setup_page, or even just setup/init. This is a minor quibble, though, so I leave it your call. dom_ready was confusing to read because my brain had to reconcile the name with the on('domready') call.

review: Approve

Preview Diff

Empty