fix whitespace
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/a337a241 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/a337a241 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/a337a241 Branch: refs/heads/master Commit: a337a2413d4eaa84444d7866dc5a7c29d6a91d8f Parents: f0ec45f Author: Jesse MacFadyen <purplecabb...@gmail.com> Authored: Fri Aug 17 12:15:48 2012 -0700 Committer: Jesse MacFadyen <purplecabb...@gmail.com> Committed: Fri Aug 17 12:15:48 2012 -0700 ---------------------------------------------------------------------- lib/windows8/plugin/windows8/CaptureProxy.js | 70 ++++++++-------- lib/windows8/plugin/windows8/MediaFile.js | 68 ++++++++-------- lib/windows8/plugin/windows8/NotificationProxy.js | 12 ++-- 3 files changed, 75 insertions(+), 75 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a337a241/lib/windows8/plugin/windows8/CaptureProxy.js ---------------------------------------------------------------------- diff --git a/lib/windows8/plugin/windows8/CaptureProxy.js b/lib/windows8/plugin/windows8/CaptureProxy.js index 34a2e33..e795ce9 100644 --- a/lib/windows8/plugin/windows8/CaptureProxy.js +++ b/lib/windows8/plugin/windows8/CaptureProxy.js @@ -11,7 +11,7 @@ module.exports = { cameraCaptureAudioDuration: null, captureAudio:function(successCallback, errorCallback, options) { - var options = options[0]; + var options = options[0]; var audioOptions = new CaptureAudioOptions(); if (options.duration && options.duration > 0) { audioOptions.duration = options.duration; @@ -50,7 +50,7 @@ module.exports = { }, captureImage:function (successCallback, errorCallback, options) { - var options = options[0]; + var options = options[0]; var imageOptions = new CaptureImageOptions(); var cameraCaptureUI = new Windows.Media.Capture.CameraCaptureUI(); cameraCaptureUI.photoSettings.allowCropping = true; @@ -72,7 +72,7 @@ module.exports = { }, captureVideo:function (successCallback, errorCallback, options) { - var options = options[0]; + var options = options[0]; var videoOptions = new CaptureVideoOptions(); if (options.duration && options.duration > 0) { videoOptions.duration = options.duration; @@ -99,36 +99,36 @@ module.exports = { }, function () { errorCallback(new CaptureError(CaptureError.CAPTURE_NO_MEDIA_FILES)); }) }, - + getFormatData:function (successCallback, errorCallback, args) { - var contentType = args[1]; - Windows.Storage.StorageFile.getFileFromPathAsync(args[0]).then(function (storageFile) { - var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase(); - if (mediaTypeFlag === "audio") { - storageFile.properties.getMusicPropertiesAsync().then(function (audioProperties) { - successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - }) - } - else if (mediaTypeFlag === "video") { - storageFile.properties.getVideoPropertiesAsync().then(function (videoProperties) { - successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - }) - } - else if (mediaTypeFlag === "image") { - storageFile.properties.getImagePropertiesAsync().then(function (imageProperties) { - successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - }) - } - else { errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)) } - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ) - } -} + var contentType = args[1]; + Windows.Storage.StorageFile.getFileFromPathAsync(args[0]).then(function (storageFile) { + var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase(); + if (mediaTypeFlag === "audio") { + storageFile.properties.getMusicPropertiesAsync().then(function (audioProperties) { + successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }) + } + else if (mediaTypeFlag === "video") { + storageFile.properties.getVideoPropertiesAsync().then(function (videoProperties) { + successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }) + } + else if (mediaTypeFlag === "image") { + storageFile.properties.getImagePropertiesAsync().then(function (imageProperties) { + successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + }) + } + else { errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)) } + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + } + ) + } +} http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a337a241/lib/windows8/plugin/windows8/MediaFile.js ---------------------------------------------------------------------- diff --git a/lib/windows8/plugin/windows8/MediaFile.js b/lib/windows8/plugin/windows8/MediaFile.js index 940886d..aa828a1 100644 --- a/lib/windows8/plugin/windows8/MediaFile.js +++ b/lib/windows8/plugin/windows8/MediaFile.js @@ -4,39 +4,39 @@ var CaptureError = require('cordova/plugin/CaptureError'); module.exports = { getFormatData: function (successCallback, errorCallback, args) { - Windows.Storage.StorageFile.getFileFromPathAsync(this.fullPath).then( - function (storageFile) { - var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase(); - if (mediaTypeFlag === "audio") { - storageFile.properties.getMusicPropertiesAsync().then( - function (audioProperties) { - successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ) - } else if (mediaTypeFlag === "video") { - storageFile.properties.getVideoPropertiesAsync().then( - function (videoProperties) { - successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ) - } else if (mediaTypeFlag === "image") { - storageFile.properties.getImagePropertiesAsync().then( - function (imageProperties) { - successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ) - } else { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)) - } - }, function () { - errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); - } - ) + Windows.Storage.StorageFile.getFileFromPathAsync(this.fullPath).then( + function (storageFile) { + var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase(); + if (mediaTypeFlag === "audio") { + storageFile.properties.getMusicPropertiesAsync().then( + function (audioProperties) { + successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + } + ) + } else if (mediaTypeFlag === "video") { + storageFile.properties.getVideoPropertiesAsync().then( + function (videoProperties) { + successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + } + ) + } else if (mediaTypeFlag === "image") { + storageFile.properties.getImagePropertiesAsync().then( + function (imageProperties) { + successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0)); + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + } + ) + } else { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)) + } + }, function () { + errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); + } + ) } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a337a241/lib/windows8/plugin/windows8/NotificationProxy.js ---------------------------------------------------------------------- diff --git a/lib/windows8/plugin/windows8/NotificationProxy.js b/lib/windows8/plugin/windows8/NotificationProxy.js index 96441a8..728fe86 100644 --- a/lib/windows8/plugin/windows8/NotificationProxy.js +++ b/lib/windows8/plugin/windows8/NotificationProxy.js @@ -16,18 +16,18 @@ module.exports = { var _title = args[1]; var _buttonLabels = args[2]; - var btnList = []; + var btnList = []; function commandHandler (command) { - win(btnList[command.label]); - }; + win(btnList[command.label]); + }; var md = new Windows.UI.Popups.MessageDialog(message, _title); var button = _buttonLabels.split(','); var btnList = []; for (var i = 0; i<button.length; i++) { - btnList[button[i]] = i+1; - md.commands.append(new Windows.UI.Popups.UICommand(button[i],commandHandler)); - }; + btnList[button[i]] = i+1; + md.commands.append(new Windows.UI.Popups.UICommand(button[i],commandHandler)); + }; md.showAsync(); },