Opened 10 years ago

Closed 6 years ago

#8805 closed enhancement (wontfix)

[patch][cla] alert, confirm and confirmValue

Reported by: kiuma Owned by: dante
Priority: high Milestone: 2.0
Component: DojoX Widgets Version: 1.3.0b2
Keywords: Cc: jbarzilai
Blocked By: Blocking:

Description

Hello I've created three functions for standard javascript alert and confirm replacement via dijit.

I've also provided dojox.widget.confirmValue the is a function that shows a confirmation dilaog that requires user input.

I've attached a patch with tests.

Attachments (3)

alertFunctions.patch (36.1 KB) - added by kiuma 10 years ago.
the source code
dojox-widget.alert.patch (10.0 KB) - added by kiuma 9 years ago.
patch for dojo version >= 1.6.0
images.tar.gz (3.2 KB) - added by kiuma 9 years ago.
... and images

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by kiuma

Attachment: alertFunctions.patch added

the source code

comment:1 Changed 10 years ago by dante

Milestone: tbd1.4
Status: newassigned
Summary: alert, confirm and confirmValue[patch][cla] alert, confirm and confirmValue

will review

comment:2 Changed 10 years ago by jbarzilai

The main difference I've seen between my own confirmation dialog that I put together and the default js confirm("message") method was whether or not execution of the javascript stopped when you displayed the dialog.

If I recall correctly the default JS confirm method will stop execution of the executing javascript until the dialog is closed that way it can return the value that was entered (same with the alert dialog).

I couldn't find a way to make the dijit Dialog behave in that fashion. I'm guessing that this patch doesn't cover this use case since it seems to just be using dijit.Dialog. Is there even a way to accomplish this? If so could it be incorporated into this patch?

comment:3 Changed 10 years ago by dante

Cc: jbarzilai added

the answer is "no". there is no way to simulate the blocking nature of confirm() ... All variations on this patch I've seen work asyncronously by defining a confirm/cancel callback.

comment:4 Changed 10 years ago by dante

Milestone: 1.41.5

some variation of this will be in 1.5. I've seen it rewritten too many times.

comment:5 Changed 9 years ago by dante

Milestone: 1.51.6

comment:6 Changed 9 years ago by dante

With the ActionBar? example in dijit.Dialog tests I think this can be a reallllly simple subclass. Provide a few new API hooks for default button setups and normalize the API.

Changed 9 years ago by kiuma

Attachment: dojox-widget.alert.patch added

patch for dojo version >= 1.6.0

Changed 9 years ago by kiuma

Attachment: images.tar.gz added

... and images

comment:7 Changed 8 years ago by dante

Milestone: 1.61.7

comment:8 Changed 8 years ago by Chris Mitchell

Milestone: 1.71.8

comment:9 Changed 7 years ago by Colin Snover

Milestone: 1.82.0

1.8 is frozen. Move all enhancements to next release. If you need an exemption from the freeze for this ticket, contact me immediately.

comment:10 Changed 6 years ago by Kitson Kelly

Resolution: wontfix
Status: assignedclosed

I am afraid that additional components such as this won't be considered for DojoX at this point and in Dojo 2.0 they will need to be a community package.

Packages can be submitted at http://packages.dojofoundation.org/ or please view where we are headed for packages in Dojo 2.0: https://docs.google.com/a/kitsonkelly.com/document/d/17B7A0eGbBAYsuZTQCnMnQ-xNiuB5NVc4vKYJqp3a_CE/edit

Note: See TracTickets for help on using tickets.