Update ui.dialog to use cordova.exec and events