Ticket #5870 (closed enhancement: wontfix)

Opened 5 months ago

Last modified 4 days ago

Dialog: option/ability to not hide after a submit

Reported by: guest Owned by: doughays
Priority: normal Milestone: 1.3
Component: Dijit Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by bill) (diff)

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

dijit.Dialog.patch (1.2 kB) - added by guest 5 months ago.
Patch dijit.Dialog

Change History

Changed 5 months ago by guest

Patch dijit.Dialog

Changed 5 months ago by bill

  • owner deleted
  • component changed from General to Dijit
  • summary changed from dijit.Dialog always hides after a submit to add 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.

Changed 5 months ago by dylan

  • milestone set to 1.2

Changed 2 months ago by bill

  • owner set to doughays
  • summary changed from add option to dijit.Dialog to not hide after a submit to Dialog: option/ability to not hide after a submit
  • description modified (diff)
  • milestone changed from 1.2 to 1.3

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.

Changed 2 months ago by doughays

  • status changed from new to closed
  • resolution set to wontfix

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>

Changed 4 days 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.