Rename to Cordova

This commit is contained in:
macdonst
2012-02-01 20:45:49 -05:00
parent fa4d6d369a
commit 664a061d10
97 changed files with 699 additions and 697 deletions
+10 -10
View File
@@ -17,8 +17,8 @@
* under the License.
*/
if (!PhoneGap.hasResource("device")) {
PhoneGap.addResource("device");
if (!Cordova.hasResource("device")) {
Cordova.addResource("device");
/**
* This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
@@ -26,12 +26,12 @@ PhoneGap.addResource("device");
* @constructor
*/
var Device = function() {
this.available = PhoneGap.available;
this.available = Cordova.available;
this.platform = null;
this.version = null;
this.name = null;
this.uuid = null;
this.phonegap = null;
this.cordova = null;
var me = this;
this.getInfo(
@@ -41,13 +41,13 @@ var Device = function() {
me.version = info.version;
me.name = info.name;
me.uuid = info.uuid;
me.phonegap = info.phonegap;
PhoneGap.onPhoneGapInfoReady.fire();
me.cordova = info.cordova;
Cordova.onCordovaInfoReady.fire();
},
function(e) {
me.available = false;
console.log("Error initializing PhoneGap: " + e);
alert("Error initializing PhoneGap: "+e);
console.log("Error initializing Cordova: " + e);
alert("Error initializing Cordova: "+e);
});
};
@@ -72,10 +72,10 @@ Device.prototype.getInfo = function(successCallback, errorCallback) {
}
// Get info
PhoneGap.exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
Cordova.exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
};
PhoneGap.addConstructor(function() {
Cordova.addConstructor(function() {
if (typeof navigator.device === "undefined") {
navigator.device = window.device = new Device();
}