visionmedia / uikit

UIKit - modern ui components for the modern web

Home Page:http://visionmedia.github.com/uikit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I create alarm dialog with no cancel button?

lexer opened this issue · comments

Should I make my own implementation like Confirmation dialog, or it is possible to reuse confirmation dialog for this purpose?

hmmm yeah maybe, or use the notifications maybe?

In our app we need to show modal window that will block user until he read the message and press "Ok"

Another example. User should be blocked until he will receive response via push notification. If user don't want to wait he ca press single button "Cancel" and resume his work.

May be it would be better to modify confirmation to show ok and cancel only if they are declared. This is how android Alerts are designed for example.

new ConfirmationDialog().ok("done") - this is alarm dialog with single ok button
new ConfirmationDialog().cancel("reset") - this is alarm dialog with single cancel button.

However in this design it should be named smth like "AlarmDialog" that is more generic name.

Have you also thought about separate callbacks? .ok("done", function(){ });

I mean "AlertDialog" not alarm. We will try to make a pull request today.

yeah we could have an Alert and ui.alert(msg) with .modal() etc default. modals in generate are kinda bad UX but I can see in some cases if you have a critical issue that needs attention

yep sure. modal should be optional.

We have added pull request #42