You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2012/08/16 18:36:18 UTC

ios commit: Updated project template with interim js

Updated Branches:
  refs/heads/master 4d88bcc12 -> 07ee5c792


Updated project template with interim js


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/07ee5c79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/07ee5c79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/07ee5c79

Branch: refs/heads/master
Commit: 07ee5c792c9f09c81906517d44734dd77308bffe
Parents: 4d88bcc
Author: Becky Gibson <be...@apache.org>
Authored: Thu Aug 16 12:34:51 2012 -0400
Committer: Becky Gibson <be...@apache.org>
Committed: Thu Aug 16 12:34:51 2012 -0400

----------------------------------------------------------------------
 bin/templates/project/www/cordova-2.0.0.js |   31 ++++++++++++++++------
 1 files changed, 22 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/07ee5c79/bin/templates/project/www/cordova-2.0.0.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/cordova-2.0.0.js b/bin/templates/project/www/cordova-2.0.0.js
index 26600b1..96e9cd9 100644
--- a/bin/templates/project/www/cordova-2.0.0.js
+++ b/bin/templates/project/www/cordova-2.0.0.js
@@ -1,6 +1,6 @@
-// commit 8c46a970a0719d0f16a225b75421ecf6f12dcc02
+// commit 33d1ef23eeabde0936351db8bda7fee27a85377d
 
-// File generated at :: Sun Jul 29 2012 14:26:58 GMT-0400 (EDT)
+// File generated at :: Thu Aug 16 2012 11:33:56 GMT-0400 (EDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -972,6 +972,9 @@ module.exports = {
         File: { // exists natively, override
             path: "cordova/plugin/File"
         },
+        FileReader: { // exists natively, override
+            path: "cordova/plugin/FileReader"
+        },
         MediaError: { // exists natively, override
             path: "cordova/plugin/MediaError"
         },
@@ -3028,14 +3031,14 @@ Media.prototype.getCurrentPosition = function(success, fail) {
  * Start recording audio file.
  */
 Media.prototype.startRecord = function() {
-    exec(this.successCallback, this.errorCallback, "Media", "startRecordingAudio", [this.id, this.src]);
+    exec(null, this.errorCallback, "Media", "startRecordingAudio", [this.id, this.src]);
 };
 
 /**
  * Stop recording audio file.
  */
 Media.prototype.stopRecord = function() {
-    exec(this.successCallback, this.errorCallback, "Media", "stopRecordingAudio", [this.id]);
+    exec(null, this.errorCallback, "Media", "stopRecordingAudio", [this.id]);
 };
 
 /**
@@ -3064,14 +3067,14 @@ Media.onStatus = function(id, msg, value) {
     var media = mediaObjects[id];
     // If state update
     if (msg === Media.MEDIA_STATE) {
+        if (media.statusCallback) {
+            media.statusCallback(value);
+        }
         if (value === Media.MEDIA_STOPPED) {
             if (media.successCallback) {
                 media.successCallback();
             }
         }
-        if (media.statusCallback) {
-            media.statusCallback(value);
-        }
     }
     else if (msg === Media.MEDIA_DURATION) {
         media._duration = value;
@@ -4478,10 +4481,20 @@ module.exports = {
          *    allowsEditing: boolean AS STRING
          *        "true" to allow editing the contact
          *        "false" (default) display contact
+         *      fields: array of fields to return in contact object (see ContactOptions.fields)
+         *
+         *    @returns
+         *        id of contact selected
+         *        ContactObject
+         *            if no fields provided contact contains just id information
+         *            if fields provided contact object contains information for the specified fields
          *
-         * returns:  the id of the selected contact as param to successCallback
          */
-        exec(successCallback, null, "Contacts","chooseContact", [options]);
+         var win = function(result) {
+             var fullContact = require('cordova/plugin/contacts').create(result);
+            successCallback(fullContact.id, fullContact);
+       };
+        exec(win, null, "Contacts","chooseContact", [options]);
     }
 };
 });