cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [8/11] js commit: [windows8] linting
Date Mon, 29 Oct 2012 22:47:12 GMT
[windows8] linting


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

Branch: refs/heads/master
Commit: e4452476fa4527c559b49116ffe2a05c93926fce
Parents: 56d29de
Author: purplecabbage <purplecabbage@gmail.com>
Authored: Thu Oct 18 19:31:57 2012 -0700
Committer: purplecabbage <purplecabbage@gmail.com>
Committed: Thu Oct 18 19:31:57 2012 -0700

----------------------------------------------------------------------
 lib/windows8/platform.js                    |   13 ++++++-------
 lib/windows8/plugin/windows8/CameraProxy.js |    8 +-------
 2 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/e4452476/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 6532b63..13c6cf0 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -47,17 +47,16 @@ module.exports = {
 
         var onWinJSReady = function () {
             var app = WinJS.Application;
-
-            app.addEventListener("checkpoint", checkpointHandler);
-            function checkpointHandler(eventArgs) {
+            var checkpointHandler = function checkpointHandler() {
                 cordova.fireDocumentEvent('pause');
             };
-
-            Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler,
false);
-            function resumingHandler() {
+            
+            var resumingHandler = function resumingHandler() {
                 cordova.fireDocumentEvent('resume');
-            }
+            };
 
+            app.addEventListener("checkpoint", checkpointHandler);
+            Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler,
false);
             app.start();
         };
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/e4452476/lib/windows8/plugin/windows8/CameraProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CameraProxy.js b/lib/windows8/plugin/windows8/CameraProxy.js
index c47b966..13fe029 100644
--- a/lib/windows8/plugin/windows8/CameraProxy.js
+++ b/lib/windows8/plugin/windows8/CameraProxy.js
@@ -53,7 +53,6 @@ module.exports = {
         var mediaType = args[6];
         var saveToPhotoAlbum = args[9];
 
-
         var pkg = Windows.ApplicationModel.Package.current;
         var packageId = pkg.installedLocation;
 
@@ -113,9 +112,6 @@ module.exports = {
                 fileEntry.file(successCB, failCB);
             };
 
-            var fail = function (fileError) {
-                errorCallback("FileError, code:" + fileError.code);
-            };
             Windows.Storage.StorageFolder.getFolderFromPathAsync(packageId.path).done(function
(storageFolder) {
                 file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function
(storageFile) {
                     success(new FileEntry(storageFile.name, storageFile.path));
@@ -191,9 +187,7 @@ module.exports = {
             } else {
                 fileOpenPicker.fileTypeFilter.replaceAll(["*"]);
             }
-            var fail = function (fileError) {
-                errorCallback("FileError, code:" + fileError.code);
-            };
+
             fileOpenPicker.pickSingleFileAsync().then(function (file) {
                 if (file) {
                     if (destinationType == Camera.DestinationType.FILE_URI) {


Mime
View raw message