incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: fixing spacing and jake warnings
Date Tue, 24 Apr 2012 23:47:26 GMT
Updated Branches:
  refs/heads/master a42f0ae62 -> bb82c944d


fixing spacing and jake warnings


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/bb82c944
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/bb82c944
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/bb82c944

Branch: refs/heads/master
Commit: bb82c944d5d7465c0e014edbcd81be919f53064e
Parents: a42f0ae
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Apr 24 16:49:37 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Apr 24 16:49:37 2012 -0700

----------------------------------------------------------------------
 lib/bada/plugin/bada/Camera.js  |    3 +--
 lib/bada/plugin/bada/Capture.js |   24 ++++++++++++------------
 lib/common/plugin/MediaFile.js  |   32 ++++++++++++++++----------------
 3 files changed, 29 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/bb82c944/lib/bada/plugin/bada/Camera.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/bada/Camera.js b/lib/bada/plugin/bada/Camera.js
index 10a5e4f..6c7e40a 100644
--- a/lib/bada/plugin/bada/Camera.js
+++ b/lib/bada/plugin/bada/Camera.js
@@ -8,14 +8,13 @@ module.exports = {
        var self = this;
        var onCreatePreviewNodeSuccess = function(previewObject) {
            var previewDiv = document.getElementById("preview");
-           previewId = previewObject.id;
            previewDiv.appendChild(previewObject);
            previewObject.style.visibility = "visible";
        };
        var error = function(e) {
            alert("An error occured: " + e.message);
        };
-        
+
        var success = function(cams) {
            if (cams.length > 0) {
             self._cams = cams;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/bb82c944/lib/bada/plugin/bada/Capture.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/bada/Capture.js b/lib/bada/plugin/bada/Capture.js
index 9d419ed..9a506d0 100644
--- a/lib/bada/plugin/bada/Capture.js
+++ b/lib/bada/plugin/bada/Capture.js
@@ -1,22 +1,22 @@
 module.exports = {
     captureAudio: function() {
-      console.log("navigator.capture.captureAudio unsupported!");
+        console.log("navigator.capture.captureAudio unsupported!");
     },
     captureVideo: function(success, fail, options) {
-          var camera = navigator.camera._mainCamera;
-      camera.startVideoCapture(success, fail, options);
-          if(options.duration) {
+        var camera = navigator.camera._mainCamera;
+        camera.startVideoCapture(success, fail, options);
+        if(options.duration) {
             Osp.Core.Function.delay(camera.stopVideoCapture, options.duration, camera);
-          }
+        }
     },
     stopVideoCapture: function() {
-      navigator.camera._mainCamera.stopVideoCapture();
+        navigator.camera._mainCamera.stopVideoCapture();
     },
     captureImage: function(success, fail, options) {
-      try {
-        navigator.camera._mainCamera.captureImage(success, fail, options);
-      } catch(exp) {
-        alert("Exception :[" + exp.code + "] " + exp.message);
-      }
+        try {
+            navigator.camera._mainCamera.captureImage(success, fail, options);
+        } catch(exp) {
+            alert("Exception :[" + exp.code + "] " + exp.message);
+        }
     }
-}
+};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/bb82c944/lib/common/plugin/MediaFile.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/MediaFile.js b/lib/common/plugin/MediaFile.js
index df271f5..5118e86 100644
--- a/lib/common/plugin/MediaFile.js
+++ b/lib/common/plugin/MediaFile.js
@@ -12,7 +12,7 @@ var utils = require('cordova/utils'),
  * size {Number} size of the file in bytes
  */
 var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
-  MediaFile.__super__.constructor.apply(this, arguments);
+    MediaFile.__super__.constructor.apply(this, arguments);
 };
 
 utils.extend(MediaFile, File);
@@ -27,10 +27,11 @@ MediaFile.prototype.getFormatData = function(successCallback, errorCallback)
{
     if (typeof this.fullPath === "undefined" || this.fullPath === null) {
         errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
     } else {
-    exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+        exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath,
this.type]);
     }
 };
 
+// TODO: can we axe this?
 /**
  * Casts a PluginResult message property  (array of objects) to an array of MediaFile objects
  * (used in Objective-C and Android)
@@ -38,19 +39,18 @@ MediaFile.prototype.getFormatData = function(successCallback, errorCallback)
{
  * @param {PluginResult} pluginResult
  */
 MediaFile.cast = function(pluginResult) {
-  var mediaFiles = [];
-  var i;
-  for (i=0; i<pluginResult.message.length; i++) {
-    var mediaFile = new MediaFile();
-    mediaFile.name = pluginResult.message[i].name;
-    mediaFile.fullPath = pluginResult.message[i].fullPath;
-    mediaFile.type = pluginResult.message[i].type;
-    mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
-    mediaFile.size = pluginResult.message[i].size;
-    mediaFiles.push(mediaFile);
-  }
-  pluginResult.message = mediaFiles;
-  return pluginResult;
+    var mediaFiles = [];
+    for (var i=0; i<pluginResult.message.length; i++) {
+        var mediaFile = new MediaFile();
+        mediaFile.name = pluginResult.message[i].name;
+        mediaFile.fullPath = pluginResult.message[i].fullPath;
+        mediaFile.type = pluginResult.message[i].type;
+        mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
+        mediaFile.size = pluginResult.message[i].size;
+        mediaFiles.push(mediaFile);
+    }
+    pluginResult.message = mediaFiles;
+    return pluginResult;
 };
 
-module.exports = MediaFile;
\ No newline at end of file
+module.exports = MediaFile;


Mime
View raw message