You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2012/06/27 23:19:05 UTC

js commit: Fixing whitespace/tab stuff

Updated Branches:
  refs/heads/master 36e6eff74 -> 8050b8167


Fixing whitespace/tab stuff


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

Branch: refs/heads/master
Commit: 8050b81679fedb70542f4efed1d1e84608ce5cb1
Parents: 36e6eff
Author: Tim Kim <ti...@nitobi.com>
Authored: Wed Jun 27 14:18:57 2012 -0700
Committer: Tim Kim <ti...@nitobi.com>
Committed: Wed Jun 27 14:18:57 2012 -0700

----------------------------------------------------------------------
 lib/playbook/plugin/playbook/capture.js |   32 +++++++++++++-------------
 1 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/8050b816/lib/playbook/plugin/playbook/capture.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/capture.js b/lib/playbook/plugin/playbook/capture.js
index ef62e54..ac74685 100644
--- a/lib/playbook/plugin/playbook/capture.js
+++ b/lib/playbook/plugin/playbook/capture.js
@@ -55,9 +55,9 @@ module.exports = {
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
     },
     captureAudio: function (args, win, fail) {
-    	var onCaptureAudioWin = function(filePath){
-    		// for some reason the filePath is coming back as a string between two double quotes 
-    		filePath = filePath.slice(1, filePath.length-1);
+        var onCaptureAudioWin = function(filePath){
+        // for some reason the filePath is coming back as a string between two double quotes
+        filePath = filePath.slice(1, filePath.length-1);
             var file = blackberry.io.file.getFileProperties(filePath);
 
             win([{
@@ -67,19 +67,19 @@ module.exports = {
                 size: file.size,
                 type: file.fileExtension
             }]);
-    	}
-    	
-    	var onCaptureAudioFail = function(){
-    		fail([]);
-    	}
-    	
+        }
+
+        var onCaptureAudioFail = function(){
+            fail([]);
+        }
+
         if (args[0].limit > 0 && args[0].duration){
-        	// a sloppy way of creating a uuid since there's no built in date function to get milliseconds since epoch
-        	// might be better to instead check files within directory and then figure out the next file name shoud be
-        	// ie, img000 -> img001 though that would take awhile and would add a whole bunch of checks 
-        	var id = new Date();
-        	id = (id.getDay()).toString() + (id.getHours()).toString() + (id.getSeconds()).toString() + (id.getMilliseconds()).toString() + (id.getYear()).toString();
-            
+            // a sloppy way of creating a uuid since there's no built in date function to get milliseconds since epoch
+            // might be better to instead check files within directory and then figure out the next file name shoud be
+            // ie, img000 -> img001 though that would take awhile and would add a whole bunch of checks
+            var id = new Date();
+            id = (id.getDay()).toString() + (id.getHours()).toString() + (id.getSeconds()).toString() + (id.getMilliseconds()).toString() + (id.getYear()).toString();
+
             var fileName = blackberry.io.dir.appDirs.shared.music.path+'/audio'+id+'.wav';
             blackberry.media.microphone.record(fileName, onCaptureAudioWin, onCaptureAudioFail);
             // multiple duration by a 1000 since it comes in as seconds
@@ -87,7 +87,7 @@ module.exports = {
         }
         else {
             win([]);
-        }    	
+        }
         return {"status": cordova.callbackStatus.NO_RESULT, "message": "WebWorks Is On It"};
     }
 };