You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/08/27 23:11:34 UTC
js commit: [WINDOWS8] more linting fixes
Updated Branches:
refs/heads/master 8878baedb -> 83504307b
[WINDOWS8] more linting fixes
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/83504307
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/83504307
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/83504307
Branch: refs/heads/master
Commit: 83504307b7ef37613bbc2a45e069c43bef4dbd59
Parents: 8878bae
Author: purplecabbage <pu...@gmail.com>
Authored: Mon Aug 27 14:11:08 2012 -0700
Committer: purplecabbage <pu...@gmail.com>
Committed: Mon Aug 27 14:11:08 2012 -0700
----------------------------------------------------------------------
lib/windows8/plugin/windows8/CaptureProxy.js | 9 +++++----
lib/windows8/plugin/windows8/NotificationProxy.js | 2 +-
lib/windows8/plugin/windows8/geolocation.js | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/83504307/lib/windows8/plugin/windows8/CaptureProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CaptureProxy.js b/lib/windows8/plugin/windows8/CaptureProxy.js
index cc80b56..786080f 100644
--- a/lib/windows8/plugin/windows8/CaptureProxy.js
+++ b/lib/windows8/plugin/windows8/CaptureProxy.js
@@ -10,10 +10,11 @@ var MediaFileData = require('cordova/plugin/MediaFileData');
module.exports = {
// No UI support. The duration of the audio recording.
- cameraCaptureAudioDuration: null,
captureAudio:function(successCallback, errorCallback, options) {
- var options = options[0];
+
+ var cameraCaptureAudioDuration = 1024;
+ options = options[0];
var audioOptions = new CaptureAudioOptions();
if (options.duration && options.duration > 0) {
audioOptions.duration = options.duration;
@@ -52,7 +53,7 @@ module.exports = {
},
captureImage:function (successCallback, errorCallback, options) {
- var options = options[0];
+ options = options[0];
var imageOptions = new CaptureImageOptions();
var cameraCaptureUI = new Windows.Media.Capture.CameraCaptureUI();
cameraCaptureUI.photoSettings.allowCropping = true;
@@ -74,7 +75,7 @@ module.exports = {
},
captureVideo:function (successCallback, errorCallback, options) {
- var options = options[0];
+ options = options[0];
var videoOptions = new CaptureVideoOptions();
if (options.duration && options.duration > 0) {
videoOptions.duration = options.duration;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/83504307/lib/windows8/plugin/windows8/NotificationProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/NotificationProxy.js b/lib/windows8/plugin/windows8/NotificationProxy.js
index 554f918..ffefc11 100644
--- a/lib/windows8/plugin/windows8/NotificationProxy.js
+++ b/lib/windows8/plugin/windows8/NotificationProxy.js
@@ -25,7 +25,7 @@ module.exports = {
var md = new Windows.UI.Popups.MessageDialog(message, _title);
var button = _buttonLabels.split(',');
- var btnList = [];
+ 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));
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/83504307/lib/windows8/plugin/windows8/geolocation.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/geolocation.js b/lib/windows8/plugin/windows8/geolocation.js
index c9d2f34..19b9a26 100644
--- a/lib/windows8/plugin/windows8/geolocation.js
+++ b/lib/windows8/plugin/windows8/geolocation.js
@@ -21,7 +21,7 @@ module.exports = { // Merges with common
// Win8 JS API coordinate Object
win(geoposition.coordinate);
}, function() {
- var e = new Object();
+ var e = {};
switch (geolocator.locationStatus) {
case Windows.Devices.Geolocation.PositionStatus.ready: