Merge lp:~rvb/launchpad/bug-869221-ui into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Raphaël Badin |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14166 |
Proposed branch: | lp:~rvb/launchpad/bug-869221-ui |
Merge into: | lp:launchpad |
Prerequisite: | lp:~rvb/launchpad/bug-869221-expose-nominatedarchindep |
Diff against target: |
433 lines (+293/-11) 5 files modified
lib/lp/app/javascript/formwidgets/formwidgets.js (+69/-3) lib/lp/app/javascript/formwidgets/tests/test_formwidgets.js (+80/-6) lib/lp/registry/javascript/distroseries/initseries.js (+18/-2) lib/lp/registry/javascript/distroseries/tests/test_widgets.js (+67/-0) lib/lp/registry/javascript/distroseries/widgets.js (+59/-0) |
To merge this branch: | bzr merge lp:~rvb/launchpad/bug-869221-ui |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+78802@code.launchpad.net |
Commit message
[r=benji][bug=869221] Force the user to select at least one architecture that can be used to build architecture independent packages.
Description of the change
This branch is another branch towards a proper fix for #869221. It changes the ui (+initseries) so that the user will get an error if no architecture suitable to build architecture independent packages is selected.
To achieve that it:
- changes the way FormRowWidget.
- add a default validate method to FormRowWidget;
- modify FormActionsWidget to be able to register widgets and call validate on each of these 'encapsulated' widgets;
- add the required methods in ArchitecturesCh
- Change lib/lp/
= Tests =
lib/lp/
lib/lp/
= QA =
Create a new series and go to ../myseries/
This branch looks good.
I can't claim it's better but I thought you might like to see another
way to use call chaining in showError:
this.fieldNode
.append( Y.Node. create( '<div />')
.addClass( 'message' )
.set( "text", error))
.ancestor( 'tr')
.addClass( 'error' );
To my eyes the above makes the structure of what's happening a little
clearer; not that it was particularly obscure to start with. The
structural subscription JS uses this pattern to good effect.
Line 233 of the diff is indented by one space too many. Oh, and you
don't really need the "check" variable.
check_ and_submit: function() {
this. submit( );
if (this.validate()) {
}
}
The join in testValidateFails surprised me. Is there a reason string
concatenation won't work there?
Assert. areEqual(
this.widget. fieldNode. one('.message' ).get(' text')) ;
"The distroseries has no architectures selected to "
+ "build architecture independent binaries.",