incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [9/10] js commit: removed WP7 specific contacts override
Date Fri, 17 Aug 2012 18:37:56 GMT
removed WP7 specific contacts override


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/387c60fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/387c60fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/387c60fa

Branch: refs/heads/master
Commit: 387c60fa66842ace79fcb2ecc491875fa1c033ca
Parents: ed3a8ea
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Aug 14 17:47:05 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Aug 14 17:47:05 2012 -0700

----------------------------------------------------------------------
 lib/wp7/plugin/wp7/contacts.js |   58 -----------------------------------
 1 files changed, 0 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/387c60fa/lib/wp7/plugin/wp7/contacts.js
----------------------------------------------------------------------
diff --git a/lib/wp7/plugin/wp7/contacts.js b/lib/wp7/plugin/wp7/contacts.js
deleted file mode 100644
index 2d867d9..0000000
--- a/lib/wp7/plugin/wp7/contacts.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var exec = require('cordova/exec'),
-    ContactError = require('cordova/plugin/ContactError'),
-    utils = require('cordova/utils'),
-    Contact = require('cordova/plugin/Contact');
-
-/**
-* Represents a group of Contacts.
-* @constructor
-*/
-var contacts = {
-    /**
-     * Returns an array of Contacts matching the search criteria.
-     * @param fields that should be searched
-     * @param successCB success callback
-     * @param errorCB error callback
-     * @param {ContactFindOptions} options that can be applied to contact searching
-     * @return array of Contacts matching search criteria
-     */
-    find:function(fields, successCB, errorCB, options) {
-        if (!successCB) {
-            throw new TypeError("You must specify a success callback for the find command.");
-        }
-        if (!fields || (utils.isArray(fields) && fields.length === 0)) {
-            if (typeof errorCB === "function") {
-                errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
-            }
-        } else {
-            var win = function(result) {
-                var cs = [];
-                for (var i = 0, l = result.length; i < l; i++) {
-                    cs.push(contacts.create(result[i]));
-                }
-                successCB(cs);
-            };
-            exec(win, errorCB, "Contacts", "search", [{"fields":fields, "options":options}]);
-        }
-    },
-
-    /**
-     * This function creates a new contact, but it does not persist the contact
-     * to device storage. To persist the contact to device storage, invoke
-     * contact.save().
-     * @param properties an object who's properties will be examined to create a new Contact
-     * @returns new Contact object
-     */
-    create:function(properties) {
-        var i;
-        var contact = new Contact();
-        for (i in properties) {
-            if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i))
{
-                contact[i] = properties[i];
-            }
-        }
-        return contact;
-    }
-};
-
-module.exports = contacts;


Mime
View raw message