branch +edit doesn't load picker JS for pretty UI elements

Bug #1076540 reported by Richard Harding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

The branch edit doesn't load any of the choice widget JS and doesn't load the banner UI based on the information type settings. It's pulling from the generic-edit.pt and should get a view/js code setup to work like the other places such as filebug, blueprints, etc.

Curtis Hovey (sinzui)
tags: added: javascript
Revision history for this message
Richard Harding (rharding) wrote :

We did some talking around this and we've had to add a bunch of custom templates for blueprints, branches, etc that's only purpose is to extend generic-edit.pt to load a javascript module that runs on the page.

The best way to get at this would be to create a new generic-edit-withjs.pt which adds two attributes to the python View.

1. JS Module name
2. JS View class name

Then this .pt could be hard wired to create a YUI block that includes the proper JS module from the python View property and runs the simple two line bootstrap:

    var view = new $classname()
    view.render();

Since we've got YUI 3.5 and we've started to use YUI View objects the API would be consistant and it would also help enforce that all JS goes into a JS file that can be tested vs the .pt file which isn't.

Revision history for this message
Richard Harding (rharding) wrote :

Or as abently brought up to add these attributes to the current default generic view and update the generic-edit.pt to add the YUI block if the attributes are defined.

Revision history for this message
Aaron Bentley (abentley) wrote :

Actually, I meant that we could update the base template to add the YUI block if the attributes are defined, so that we can use the same mechanism to load JS whether or not we're using generic-edit.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.