Adding Contacts.create method

This commit is contained in:
macdonst 2010-10-02 04:55:20 +08:00
parent 9671083bed
commit c91ea37438
2 changed files with 20 additions and 0 deletions

View File

@ -100,6 +100,16 @@ Contacts.prototype.find = function(fields, win, fail, options) {
PhoneGap.execAsync(null, null, "Contacts", "search", [fields, options]);
};
Contacts.prototype.wacky = function(properties) {
var contact = new Contact();
for (i in properties) {
if (contact[i]!='undefined') {
contact[i]=properties[i];
}
}
return contact;
};
Contacts.prototype.droidDone = function(contacts) {
this.win(eval('(' + contacts + ')'));
};

View File

@ -1049,6 +1049,16 @@ Contacts.prototype.find = function(fields, win, fail, options) {
PhoneGap.execAsync(null, null, "Contacts", "search", [fields, options]);
};
Contacts.prototype.wacky = function(properties) {
var contact = new Contact();
for (i in properties) {
if (contact[i]!='undefined') {
contact[i]=properties[i];
}
}
return contact;
};
Contacts.prototype.droidDone = function(contacts) {
this.win(eval('(' + contacts + ')'));
};