soyjavi/tuktuk — pull request #42 by aberigle (2013-09-24 15:33:59+00:00)
Title: Emulate native alert, confirm and prompt using Modals

Hi!
I've tried to implement the functionality of the alert, confirm and prompt native functions using the Modal class.

The results are handled using callbacks, trying to emulate the native ones, as I explain bellow. In all of them the ```message``` is optional, falling back to ```""``` if empty:

#### Alert
It's called with ```TukTuk.Modal.alert(message)```
This has no callback, just like the native one.

#### Confirm
It's called with ```TukTuk.Modal.confirm(message, trueCallback, falseCallback)```
Will fire the appropiate callback depending on the user's response. Of course, none of the callback's is required.

#### Prompt
It's called with ```TukTuk.Modal.prompt(message, callback)```
This will fire the callback giving as an argument the text the user had previously typed. If the user cancels the Modal no callback will be fired.

This is mostly an attemp to give the applications and websites using this framework more visual consistency and to facilitate the development process not having to write them all the times!

Let me know what do you think! :+1: