Merge lp://staging/~rockstar/phazr/forms-and-overlays into lp://staging/phazr

Proposed by Paul Hummer
Status: Merged
Approved by: Paul Hummer
Approved revision: 10
Merged at revision: 3
Proposed branch: lp://staging/~rockstar/phazr/forms-and-overlays
Merge into: lp://staging/phazr
Diff against target: 231 lines (+196/-0)
5 files modified
examples/formplugin/index.html (+48/-0)
src/css/phazr.css (+13/-0)
src/js/formplugin/formplugin.js (+72/-0)
tests/formplugin.js (+45/-0)
tests/index.html (+18/-0)
To merge this branch: bzr merge lp://staging/~rockstar/phazr/forms-and-overlays
Reviewer Review Type Date Requested Status
Deryck Hodge code Approve
Review via email: mp+54115@code.staging.launchpad.net

Commit message

Provide a FormPlugin for Overlay, so that we can handle forms in a cleaner manner.

Description of the change

This branch adds a plugin to Y.Overlay that makes it easy to work with forms in the overlay. It provides two methods that hang off the host overlay: loadForm and loadFormFromURL. They essentially do the same thing, one loads the form from a string, the other loads it from a URL.

Along with those two methods, it also replaces the footer with Save/Cancel buttons. It automatically deals with the Cancel event by hiding the form (smart). It defaults the Save button to an empty function. When plugging the plugin, it takes a submitFn property that is the save function.

It also has tests.

To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote :

Nicely played, sir! Amazing to see some of the functionality we use now re-written to leverage YUI better. As we discussed, your instincts are good to not override the footer. Do a new node after it with the buttons.

I'll also go on record as being unsure of the docstring-like test names, though I do find it helpful all the same. I game to try it this way for phazr, but it's kind of odd all the same.

review: Approve (code)
Revision history for this message
Paul Hummer (rockstar) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: