cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/11] js commit: fixing whitespaces
Date Tue, 16 Oct 2012 18:33:27 GMT
fixing whitespaces


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

Branch: refs/heads/master
Commit: 0446756caf71f0ac90298349001a4003ba13b3dd
Parents: 335889f
Author: Anis Kadri <anis.kadri@gmail.com>
Authored: Tue Oct 16 11:28:54 2012 -0700
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Tue Oct 16 11:28:54 2012 -0700

----------------------------------------------------------------------
 lib/webos/exec.js                           |    6 +-
 lib/webos/platform.js                       |   18 +++---
 lib/webos/plugin/webos/accelerometer.js     |    8 +-
 lib/webos/plugin/webos/application.js       |   46 +++++++-------
 lib/webos/plugin/webos/camera.js            |   36 ++++++------
 lib/webos/plugin/webos/device.js            |    2 +-
 lib/webos/plugin/webos/filereader.js        |   32 +++++-----
 lib/webos/plugin/webos/keyboard.js          |   46 +++++++-------
 lib/webos/plugin/webos/network.js           |   32 +++++-----
 lib/webos/plugin/webos/notification.js      |   16 +++---
 lib/webos/plugin/webos/orientation.js       |    4 +-
 lib/webos/plugin/webos/requestfilesystem.js |   24 ++++----
 lib/webos/plugin/webos/service.js           |   68 +++++++++++-----------
 lib/webos/plugin/webos/window.js            |   10 ++--
 14 files changed, 174 insertions(+), 174 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/exec.js
----------------------------------------------------------------------
diff --git a/lib/webos/exec.js b/lib/webos/exec.js
index bd69d2a..e481748 100644
--- a/lib/webos/exec.js
+++ b/lib/webos/exec.js
@@ -20,13 +20,13 @@ var plugins = {
     "Camera": require('cordova/plugin/webos/camera'),
     "Accelerometer" : require('cordova/plugin/webos/accelerometer'),
     "Notification" : require('cordova/plugin/webos/notification'),
-    "Geolocation": require('cordova/plugin/webos/geolocation')     
+    "Geolocation": require('cordova/plugin/webos/geolocation')
 };
 
 module.exports = function(success, fail, service, action, args) {
     try {
-    	console.error("exec:call plugin:"+service+":"+action);
-       	plugins[service][action](success, fail, args);
+        console.error("exec:call plugin:"+service+":"+action);
+        plugins[service][action](success, fail, args);
     }
     catch(e) {
         console.error("missing exec: " + service + "." + action);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/platform.js
----------------------------------------------------------------------
diff --git a/lib/webos/platform.js b/lib/webos/platform.js
index 162144c..b60096d 100644
--- a/lib/webos/platform.js
+++ b/lib/webos/platform.js
@@ -6,8 +6,8 @@ module.exports = {
         }
         Mojo = window.Mojo || {};
         Mojo.stageActivated = function() {
-			console.error("stageActivated");
-		}
+            console.error("stageActivated");
+        }
     },
     objects: {
         requestFileSystem:{
@@ -20,23 +20,23 @@ module.exports = {
     merges: {
         navigator: {
             children: {
-            	service: {
-					path: "cordova/plugin/webos/service"
-            	},
+                service: {
+                    path: "cordova/plugin/webos/service"
+                },
                 application: {
                     path: "cordova/plugin/webos/application"
                 },
                 window: {
-                    path: "cordova/plugin/webos/window"	
+                    path: "cordova/plugin/webos/window"
                 },
                 notification: {
-                	path: "cordova/plugin/webos/notification"	
+                    path: "cordova/plugin/webos/notification"
                 },
                 orientation: {
-                	path: "cordova/plugin/webos/orientation"
+                    path: "cordova/plugin/webos/orientation"
                 },
                 keyboard: {
-                	path: "cordova/plugin/webos/keyboard"
+                    path: "cordova/plugin/webos/keyboard"
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/accelerometer.js b/lib/webos/plugin/webos/accelerometer.js
index c2e1aec..afb4cef 100644
--- a/lib/webos/plugin/webos/accelerometer.js
+++ b/lib/webos/plugin/webos/accelerometer.js
@@ -6,11 +6,11 @@ module.exports={
  * @param {Boolean} state
  * Dependencies: Mojo.windowProperties
  * Example:
- * 		navigator.accelerometer.setFastAccelerometer(true)
+ *         navigator.accelerometer.setFastAccelerometer(true)
  */
 setFastAccelerometer: function(state) {
-	navigator.windowProperties.fastAccelerometer = state;
-	navigator.window.setWindowProperties();
+    navigator.windowProperties.fastAccelerometer = state;
+    navigator.window.setWindowProperties();
 },
 
 /*
@@ -23,7 +23,7 @@ start: function(win,fail,args) {
         var accel = new Acceleration(event.accelX*-9.81, event.accelY*-9.81, event.accelZ*-9.81);
         win(accel);
     }
-	document.addEventListener("acceleration", callback);
+    document.addEventListener("acceleration", callback);
 },
 stop: function (win,fail,args) {
     console.error("webos plugin accelerometer stop");

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/application.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/application.js b/lib/webos/plugin/webos/application.js
index 530f73f..8414587 100644
--- a/lib/webos/plugin/webos/application.js
+++ b/lib/webos/plugin/webos/application.js
@@ -1,51 +1,51 @@
 module.exports={
 
 isActivated: function(inWindow) {
-	inWindow = inWindow || window;
-	if(inWindow.PalmSystem) {
-		return inWindow.PalmSystem.isActivated
-	}
-	return false;
+    inWindow = inWindow || window;
+    if(inWindow.PalmSystem) {
+        return inWindow.PalmSystem.isActivated
+    }
+    return false;
 },
 
 /*
  * Tell webOS to activate the current page of your app, bringing it into focus.
  * Example:
- * 		navigator.application.activate();
- */		
+ *         navigator.application.activate();
+ */
 activate: function(inWindow) {
-	inWindow = inWindow || window;
-	if(inWindow.PalmSystem) {
-		inWindow.PalmSystem.activate();
-	}
+    inWindow = inWindow || window;
+    if(inWindow.PalmSystem) {
+        inWindow.PalmSystem.activate();
+    }
 },
 
 /*
  * Tell webOS to deactivate your app.
  * Example:
- *		navigator.application.deactivate();
- */	
+ *        navigator.application.deactivate();
+ */
 deactivate: function(inWindow) {
-	inWindow = inWindow || window;
-	if(inWindow.PalmSystem) {
-		inWindow.PalmSystem.deactivate();
-	}
+    inWindow = inWindow || window;
+    if(inWindow.PalmSystem) {
+        inWindow.PalmSystem.deactivate();
+    }
 },
 
 /*
  * Returns the identifier of the current running application (e.g. com.yourdomain.yourapp).
  * Example:
- *		navigator.application.getIdentifier();
+ *        navigator.application.getIdentifier();
  */
 getIdentifier: function() {
-	return PalmSystem.identifier;
+    return PalmSystem.identifier;
 },
 
 fetchAppId: function() {
-	if (window.PalmSystem) {
-		// PalmSystem.identifier: <appid> <processid>
-		return PalmSystem.identifier.split(" ")[0];
-	}
+    if (window.PalmSystem) {
+        // PalmSystem.identifier: <appid> <processid>
+        return PalmSystem.identifier.split(" ")[0];
+    }
 }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/camera.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/camera.js b/lib/webos/plugin/webos/camera.js
index 32e9213..6171133 100644
--- a/lib/webos/plugin/webos/camera.js
+++ b/lib/webos/plugin/webos/camera.js
@@ -4,26 +4,26 @@ module.exports = {
 
 takePicture: function(successCallback, errorCallback, options) {
 
-	var filename = "";
+    var filename = "";
 
-	if (typeof options != 'undefined' && typeof options.filename != 'undefined') {
-		filename = options.filename;
-	}	
+    if (typeof options != 'undefined' && typeof options.filename != 'undefined')
{
+        filename = options.filename;
+    }
 
-	this.service = service.Request('palm://com.palm.applicationManager', {
-		method: 'launch',
-		parameters: {
-		id: 'com.palm.app.camera',
-		params: {
-				appId: 'com.palm.app.camera',
-				name: 'capture',
-				sublaunch: true,
-				filename: filename
-			}
-		},
-		onSuccess: successCallback,
-		onFailure: errorCallback
-	});	
+    this.service = service.Request('palm://com.palm.applicationManager', {
+        method: 'launch',
+        parameters: {
+        id: 'com.palm.app.camera',
+        params: {
+                appId: 'com.palm.app.camera',
+                name: 'capture',
+                sublaunch: true,
+                filename: filename
+            }
+        },
+        onSuccess: successCallback,
+        onFailure: errorCallback
+    });
 }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/device.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/device.js b/lib/webos/plugin/webos/device.js
index c0d7e59..b0e3c28 100644
--- a/lib/webos/plugin/webos/device.js
+++ b/lib/webos/plugin/webos/device.js
@@ -8,7 +8,7 @@ module.exports={
         method:"Get",
         parameters:{"key": "com.palm.properties.nduid" },
         onSuccess: postData
-    }); 
+    });
 
     function postData(result) {
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/filereader.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/filereader.js b/lib/webos/plugin/webos/filereader.js
index 971f195..d493f92 100644
--- a/lib/webos/plugin/webos/filereader.js
+++ b/lib/webos/plugin/webos/filereader.js
@@ -22,9 +22,9 @@ var FileReader = function() {
 };
 
 FileReader.prototype.readAsText=function(file, encoding) {
-	console.error("webos plugin filereader readastext:"+file);
-	//Mojo has no file i/o yet, so we use an xhr. very limited
-	
+    console.error("webos plugin filereader readastext:"+file);
+    //Mojo has no file i/o yet, so we use an xhr. very limited
+
     // Already loading something
     if (this.readyState == FileReader.LOADING) {
         throw new FileError(FileError.INVALID_STATE_ERR);
@@ -43,12 +43,12 @@ FileReader.prototype.readAsText=function(file, encoding) {
 
     var me = this;
 
-	var xhr = new XMLHttpRequest();
-	xhr.onreadystatechange = function() {
-		console.error("onreadystatechange:"+xhr.readyState+" "+xhr.status);
-		if (xhr.readyState == 4) {
-			if (xhr.status == 200 && xhr.responseText != null) {
-				console.error("file read completed");
+    var xhr = new XMLHttpRequest();
+    xhr.onreadystatechange = function() {
+        console.error("onreadystatechange:"+xhr.readyState+" "+xhr.status);
+        if (xhr.readyState == 4) {
+            if (xhr.status == 200 && xhr.responseText != null) {
+                console.error("file read completed");
             // Save result
             me.result = xhr.responseText;
 
@@ -65,9 +65,9 @@ FileReader.prototype.readAsText=function(file, encoding) {
                 me.onloadend(new ProgressEvent("loadend", {target:me}));
             }
 
-			} else {
+            } else {
 
-		// If DONE (cancelled), then don't do anything
+        // If DONE (cancelled), then don't do anything
         if (me.readyState === FileReader.DONE) {
             return;
         }
@@ -90,11 +90,11 @@ FileReader.prototype.readAsText=function(file, encoding) {
             me.onloadend(new ProgressEvent("loadend", {target:me}));
         }
 
-			}
-		}
-	};
-	xhr.open("GET", file, true);
-	xhr.send();
+            }
+        }
+    };
+    xhr.open("GET", file, true);
+    xhr.send();
 };
 
 module.exports = FileReader;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/keyboard.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/keyboard.js b/lib/webos/plugin/webos/keyboard.js
index 61f0bdb..467e027 100644
--- a/lib/webos/plugin/webos/keyboard.js
+++ b/lib/webos/plugin/webos/keyboard.js
@@ -1,46 +1,46 @@
 module.exports={
 
 types: {
-	text: 0,
-	password: 1,
-	search: 2,
-	range: 3,
-	email: 4,
-	number: 5,
-	phone: 6,
-	url: 7,
-	color: 8
+    text: 0,
+    password: 1,
+    search: 2,
+    range: 3,
+    email: 4,
+    number: 5,
+    phone: 6,
+    url: 7,
+    color: 8
 },
 _isShowing:null,
 _manual:null,
 isManualMode:null,
 isShowing: function() {
-	return _isShowing || false;
+    return _isShowing || false;
 },
 show: function(type){
-	if(isManualMode()) {
-		PalmSystem.keyboardShow(type || 0);
-	}
+    if(isManualMode()) {
+        PalmSystem.keyboardShow(type || 0);
+    }
 },
 hide: function(){
-	if(isManualMode()) {
-		PalmSystem.keyboardHide();
-	}
+    if(isManualMode()) {
+        PalmSystem.keyboardHide();
+    }
 },
 setManualMode: function(mode){
-	_manual = mode;
-	PalmSystem.setManualKeyboardEnabled(mode);
+    _manual = mode;
+    PalmSystem.setManualKeyboardEnabled(mode);
 },
 isManualMode: function(){
-	return _manual || false;
+    return _manual || false;
 },
 forceShow: function(inType){
-	this.setManualMode(true);
-	PalmSystem.keyboardShow(inType || 0);
+    this.setManualMode(true);
+    PalmSystem.keyboardShow(inType || 0);
 },
 forceHide: function(){
-	this.setManualMode(true);
-	PalmSystem.keyboardHide();
+    this.setManualMode(true);
+    PalmSystem.keyboardHide();
 }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/network.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/network.js b/lib/webos/plugin/webos/network.js
index dd7a615..8526d75 100644
--- a/lib/webos/plugin/webos/network.js
+++ b/lib/webos/plugin/webos/network.js
@@ -7,27 +7,27 @@ module.exports = {
  * @param {Function} successCallback The function to call when the Connection data is available
  * @param {Function} errorCallback The function to call when there is an error getting the
Connection data. (OPTIONAL)
  */
-	getConnectionInfo: function (successCallback, errorCallback) {
-   	// Get info
+    getConnectionInfo: function (successCallback, errorCallback) {
+       // Get info
     console.log("webos Plugin: NetworkStatus - getConnectionInfo");
 
-	this.request = service.Request('palm://com.palm.connectionmanager', {
-	    method: 'getstatus',
-	    parameters: {},
-	    onSuccess: postData, 
-	    onFailure: function() {}
-	});	
+    this.request = service.Request('palm://com.palm.connectionmanager', {
+        method: 'getstatus',
+        parameters: {},
+        onSuccess: postData,
+        onFailure: function() {}
+    });
 
-	function postData(result) {
-		console.log("result:"+JSON.stringify(result));
+    function postData(result) {
+        console.log("result:"+JSON.stringify(result));
 
-		var info={};
-		if (!result.isInternetConnectionAvailable) { info.type="Connection.NONE"; }
-		if (result.wifi.onInternet) { info.type="Connection.WIFI"; }
-		if (result.wan.state==="connected") { info.type="Connection.CELL_2G"; }
+        var info={};
+        if (!result.isInternetConnectionAvailable) { info.type="Connection.NONE"; }
+        if (result.wifi.onInternet) { info.type="Connection.WIFI"; }
+        if (result.wan.state==="connected") { info.type="Connection.CELL_2G"; }
 
-		successCallback(info.type);
-	}
+        successCallback(info.type);
+    }
 
     }
 };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/notification.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/notification.js b/lib/webos/plugin/webos/notification.js
index 777114e..5264aa1 100644
--- a/lib/webos/plugin/webos/notification.js
+++ b/lib/webos/plugin/webos/notification.js
@@ -4,7 +4,7 @@ module.exports={
  * @param {String} url
  * @param {String} html
  * Example:
- *		navigator.notification.newDashboard("dashboard.html");
+ *        navigator.notification.newDashboard("dashboard.html");
  */
 newDashboard: function(url, html) {
     var win = window.open(url, "_blank", "attributes={\"window\":\"dashboard\"}");
@@ -17,12 +17,12 @@ newDashboard: function(url, html) {
  * If no 'icon' filename is specified, will use a small version of your application icon.
  * @param {String} message
  * @param {Object} response
- * @param {String} icon 
+ * @param {String} icon
  * @param {String} soundClass class of the sound; supported classes are: "ringtones", "alerts",
"alarm", "calendar", "notification"
  * @param {String} soundFile partial or full path to the sound file
  * @param {String} soundDurationMs of sound in ms
  * Example:
- *		navigator.notification.showBanner('test message');
+ *        navigator.notification.showBanner('test message');
  */
 showBanner: function(message, response, icon, soundClass, soundFile, soundDurationMs) {
     var response = response || {
@@ -34,9 +34,9 @@ showBanner: function(message, response, icon, soundClass, soundFile, soundDurati
 /**
  * Remove a banner from the banner area. The category parameter defaults to 'banner'. Will
not remove
  * messages that are already displayed.
- * @param {String} category 
-		Value defined by the application and usually same one used in {@link showBanner}. 
-		It is used if you have more than one kind of banner message. 
+ * @param {String} category
+        Value defined by the application and usually same one used in {@link showBanner}.
+        It is used if you have more than one kind of banner message.
  */
 removeBannerMessage: function(category) {
     var bannerKey = category || 'banner';
@@ -85,7 +85,7 @@ vibrate_private: function(duration, intensity) {
 vibrate: function(param) {
     PalmSystem.playSoundNotification('vibrate');
 },
-/* 
+/*
  * Plays the specified sound
  * @param {String} soundClass class of the sound; supported classes are: "ringtones", "alerts",
"alarm", "calendar", "notification"
  * @param {String} soundFile partial or full path to the sound file
@@ -109,7 +109,7 @@ open: function(inOpener, inUrl, inName, inAttributes, inWindowInfo) {
         var url = inUrl;
         var a = inAttributes && JSON.stringify(inAttributes);
         var a = "attributes=" + a;
-        var i = inWindowInfo ? inWindowInfo + ", " : ""; 
+        var i = inWindowInfo ? inWindowInfo + ", " : "";
         return inOpener.open(url, inName, i + a);
 },
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/orientation.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/orientation.js b/lib/webos/plugin/webos/orientation.js
index 2d732c6..58a0d64 100644
--- a/lib/webos/plugin/webos/orientation.js
+++ b/lib/webos/plugin/webos/orientation.js
@@ -1,7 +1,7 @@
 module.exports={
 
 setOrientation: function(orientation) {
-	PalmSystem.setWindowOrientation(orientation);   
+    PalmSystem.setWindowOrientation(orientation);
 },
 
 /*
@@ -9,7 +9,7 @@ setOrientation: function(orientation) {
  * orientation is one of 'up', 'down', 'left', 'right', or 'free'
  */
 getCurrentOrientation: function() {
-  	return PalmSystem.windowOrientation;
+      return PalmSystem.windowOrientation;
 }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/requestfilesystem.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/requestfilesystem.js b/lib/webos/plugin/webos/requestfilesystem.js
index daddf0a..6effbd8 100644
--- a/lib/webos/plugin/webos/requestfilesystem.js
+++ b/lib/webos/plugin/webos/requestfilesystem.js
@@ -1,19 +1,19 @@
 var requestFileSystem=function(type,size,successCallback,errorCallback) {
-	console.error("requestFileSystem");
+    console.error("requestFileSystem");
 
-	var theFileSystem={};
-	theFileSystem.name="webOS";
-	theFileSystem.root={};
-	theFileSystem.root.name="Root";
+    var theFileSystem={};
+    theFileSystem.name="webOS";
+    theFileSystem.root={};
+    theFileSystem.root.name="Root";
 
-	theFileSystem.root.getFile=function(filename,options,successCallback,errorCallback) {
-		console.error("getFile");
-		if (options.create) { errorCallback(); }
-		var theFile=filename;
-		successCallback(theFile);
-	}
+    theFileSystem.root.getFile=function(filename,options,successCallback,errorCallback) {
+        console.error("getFile");
+        if (options.create) { errorCallback(); }
+        var theFile=filename;
+        successCallback(theFile);
+    }
 
-	successCallback(theFileSystem);
+    successCallback(theFileSystem);
 };
 
 module.exports = requestFileSystem;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/service.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/service.js b/lib/webos/plugin/webos/service.js
index cbbf97c..86cb29e 100644
--- a/lib/webos/plugin/webos/service.js
+++ b/lib/webos/plugin/webos/service.js
@@ -20,54 +20,54 @@
 */
 
 function Service() {
-	
+
 };
 
 Service.prototype.Request = function (uri, params) {
-	var req = new PalmServiceBridge();
-	var url = uri + "/" + (params.method || "");
-	req.url = url;
-
-	this.req = req;
-	this.url = url;
-	this.params = params || {};
-	
-	this.call(params);
-	
-	return this;
+    var req = new PalmServiceBridge();
+    var url = uri + "/" + (params.method || "");
+    req.url = url;
+
+    this.req = req;
+    this.url = url;
+    this.params = params || {};
+
+    this.call(params);
+
+    return this;
 };
 
 Service.prototype.call = function(params) {
-	var onsuccess = null;
-	var onfailure = null;
-	var oncomplete = null;
+    var onsuccess = null;
+    var onfailure = null;
+    var oncomplete = null;
+
+    if (typeof params.onSuccess === 'function')
+        onsuccess = params.onSuccess;
 
-	if (typeof params.onSuccess === 'function')
-		onsuccess = params.onSuccess;
+    if (typeof params.onFailure === 'function')
+        onerror = params.onFailure;
 
-	if (typeof params.onFailure === 'function')
-		onerror = params.onFailure;
+    if (typeof params.onComplete === 'function')
+        oncomplete = params.onComplete;
 
-	if (typeof params.onComplete === 'function')
-		oncomplete = params.onComplete;
+    this.req.onservicecallback = callback;
 
-	this.req.onservicecallback = callback;
+    function callback(msg) {
+        var response = JSON.parse(msg);
 
-	function callback(msg) {
-		var response = JSON.parse(msg);
+        if ((response.errorCode) && onfailure)
+            onfailure(response);
+        else if (onsuccess)
+            onsuccess(response);
 
-		if ((response.errorCode) && onfailure)
-			onfailure(response);
-		else if (onsuccess)
-			onsuccess(response);
-		
-		if (oncomplete)
-			oncomplete(response);
-	}
+        if (oncomplete)
+            oncomplete(response);
+    }
 
-	this.data = (typeof params.parameters === 'object') ? JSON.stringify(params.parameters)
: '{}';
+    this.data = (typeof params.parameters === 'object') ? JSON.stringify(params.parameters)
: '{}';
 
-	this.req.call(this.url, this.data);
+    this.req.call(this.url, this.data);
 }
 
 module.exports=new Service();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0446756c/lib/webos/plugin/webos/window.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/window.js b/lib/webos/plugin/webos/window.js
index bcb3cd6..d099c99 100644
--- a/lib/webos/plugin/webos/window.js
+++ b/lib/webos/plugin/webos/window.js
@@ -9,7 +9,7 @@ launchParams: function() {
  * @param {String} url
  * @param {String} html
  * Example:
- *		navigator.window.newCard('about:blank', '<html><body>Hello again!</body></html>');
+ *        navigator.window.newCard('about:blank', '<html><body>Hello again!</body></html>');
  */
 newCard: function(url, html) {
     var win = window.open(url || "");
@@ -22,7 +22,7 @@ newCard: function(url, html) {
  * Enable or disable full screen display (full screen removes the app menu bar and the rounded
corners of the screen).
  * @param {Boolean} state
  * Example:
- *		navigator.window.setFullScreen(true);
+ *        navigator.window.setFullScreen(true);
  */
 setFullScreen: function(state) {
     // valid state values are: true or false
@@ -33,7 +33,7 @@ setFullScreen: function(state) {
  * used to set the window properties of the WebOS app
  * @param {Object} props
  * Example:
- * 		private method used by other member functions - ideally we shouldn't call this method
+ *         private method used by other member functions - ideally we shouldn't call this
method
  */
 setWindowProperties: function(inWindow, inProps) {
     if(arguments.length==1) {
@@ -49,7 +49,7 @@ setWindowProperties: function(inWindow, inProps) {
  * Enable or disable screen timeout. When enabled, the device screen will not dim. This is
useful for navigation, clocks or other "dock" apps.
  * @param {Boolean} state
  * Example:
- *		navigator.window.blockScreenTimeout(true);
+ *        navigator.window.blockScreenTimeout(true);
  */
 blockScreenTimeout: function(state) {
     navigator.windowProperties.blockScreenTimeout = state;
@@ -60,7 +60,7 @@ blockScreenTimeout: function(state) {
  * Sets the lightbar to be a little dimmer for screen locked notifications.
  * @param {Boolean} state
  * Example:
- *		navigator.window.setSubtleLightbar(true);
+ *        navigator.window.setSubtleLightbar(true);
  */
 setSubtleLightbar: function(state) {
     navigator.windowProperties.setSubtleLightbar = state;


Mime
View raw message