mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
Changed javascript to ask for callbacks rather than elements
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
var ContactView = function() {};
|
||||
|
||||
ContactView.prototype.show = function(nameElement, phoneElement) {
|
||||
ContactView.prototype.show = function(successCallback, failCallback) {
|
||||
|
||||
function success(args) {
|
||||
nameElement.value = typeof args.name != "undefined" ? args.name : "";
|
||||
phoneElement.value = typeof args.phone != "undefined" ? args.phone : "";
|
||||
successCallback(args);
|
||||
}
|
||||
|
||||
function fail(args) {
|
||||
alert("fail "+args)
|
||||
failCallback(args);
|
||||
}
|
||||
|
||||
return PhoneGap.exec(function(args) {
|
||||
|
||||
Reference in New Issue
Block a user