Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#5870 closed enhancement (wontfix)

Dialog: option/ability to not hide after a submit

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.3
Component: Dijit Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I'd like to keep my dijit.Dialog up after a submit, I want my execute to add a callback to hide the dialog only in certain circumstances.

With that in mind, I've subclassed dijit.Dialog and changed postCreate to not connect onExecute or onCancel to hide. I think it would be nice to make this an option for all dijit.Dialog isntances, so here's a patch to add an autoHide flag and an _autoHide function that only hides if autoHide is true.

  • Jeffrey

Attachments (1)

dijit.Dialog.patch (1.2 KB) - added by guest 12 years ago.
Patch dijit.Dialog

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by guest

Attachment: dijit.Dialog.patch added

Patch dijit.Dialog

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Owner: anonymous deleted
Summary: dijit.Dialog always hides after a submitadd option to dijit.Dialog to not hide after a submit

Hmm, why don't you just not do a submit but rather have a plain button in the dialog? you can connect it to do whatever you want, including querying the dialog for all it's values.

comment:2 Changed 12 years ago by dylan

Milestone: 1.2

comment:3 Changed 11 years ago by bill

Description: modified (diff)
Milestone: 1.21.3
Owner: set to Douglas Hays
Summary: add option to dijit.Dialog to not hide after a submitDialog: option/ability to not hide after a submit

On a dijit.Form we can do onSubmit="return false;", maybe can do same thing for Dialog, rather than adding a new option. Passing to Doug.

comment:4 Changed 11 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

This functionality should be accomplished via the submit button onclick method. Here's an example:

<button dojoType=dijit.form.Button type="submit" 
     onClick="return confirm('Hide dialog?')">OK</button>

comment:5 Changed 11 years ago by dante

(In [14447]) refs #5870 - this example burried in this ticket is useful to people. add test case showing how to prevent form closing the dialog on submit.

Note: See TracTickets for help on using tickets.