mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Adding clone functionality to Contact object
This commit is contained in:
@@ -27,6 +27,20 @@ var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, ad
|
||||
this.connected = connected || null;
|
||||
};
|
||||
|
||||
|
||||
Contact.prototype.remove = function(contact) {
|
||||
};
|
||||
|
||||
Contact.prototype.clone = function() {
|
||||
var clonedContact = PhoneGap.clone(this);
|
||||
clonedContact.id = null;
|
||||
return clonedContact;
|
||||
};
|
||||
|
||||
Contact.prototype.save = function(contact) {
|
||||
};
|
||||
|
||||
|
||||
var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
|
||||
this.formatted = formatted || null;
|
||||
this.familyName = familyName || null;
|
||||
@@ -72,7 +86,6 @@ var Contacts = function() {
|
||||
this.records = new Array();
|
||||
}
|
||||
|
||||
// Contacts.prototype.find = function(obj, win, fail) {
|
||||
Contacts.prototype.find = function(fields, win, fail, options) {
|
||||
this.win = win;
|
||||
this.fail = fail;
|
||||
@@ -84,16 +97,9 @@ Contacts.prototype.droidDone = function(contacts) {
|
||||
this.win(eval('(' + contacts + ')'));
|
||||
};
|
||||
|
||||
Contacts.prototype.remove = function(contact) {
|
||||
|
||||
};
|
||||
|
||||
Contacts.prototype.save = function(contact) {
|
||||
|
||||
};
|
||||
|
||||
// This function does not create a new contact in the db.
|
||||
// Must call contact.save() for it to be persisted in the db.
|
||||
Contacts.prototype.create = function(contact) {
|
||||
|
||||
};
|
||||
|
||||
Contacts.prototype.m_foundContacts = function(win, contacts) {
|
||||
|
||||
Reference in New Issue
Block a user