My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 22: Push data for "persist" option before calling custom onClose callback
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  emartin24
Closed:  Dec 04
Type-Enhancement
Priority-Medium


Sign in to add a comment
 
Reported by cavidae, Jun 18, 2009
I may be missing the obvious "correct" way to do this so please give me any
hints if you have any.

Desired usage (confirm with option):
 * Modal with some fields from a larger HTML form
 * User fills in this field and "submits" the form 
 * Fields are push back to the larger form
 * Form submits
Legacy reasons prevent me from bring the whole form into the pop-up.

Problem with 1.3b1 that prevent desired usage.
 * onClose call back occurs before data is pushed back into the form
I'm unaware of a "real" onClose callback that happens after the data has be
fully pushed back into the page. Where do I put my forms[0].submit() ?

Suggested solution; push the data back twice. Additionally do it before
calling the the onClose callback.

In Code this could be inserting this block before calling the onClose event.
if (this.dialog.parentNode && this.opts.persist) {
 this.dialog.data.appendTo(this.dialog.parentNode).hide();
}
Comment 1 by emartin24, Dec 04, 2009
cavidae,

It is probably a confusion of terms/semantics, but basically the onOpen and onClose
are used to manually open and close the dialog.

So, in your case, I would suggest handling the submit and processing in the onShow
callback and then calling $.modal.close() when you are ready to really close the
dialog...leaving only closing animations for the onClose callback.

HTH
Status: Invalid
Sign in to add a comment

Hosted by Google Code