You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/07/12 01:29:44 UTC
[1/2] js commit: [CB-1013] Updated necessary JS bits for common
device module use in iOS
Updated Branches:
refs/heads/device f520e3ee9 -> 58b299e15
[CB-1013] Updated necessary JS bits for common device module use in iOS
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/58b299e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/58b299e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/58b299e1
Branch: refs/heads/device
Commit: 58b299e158a6f280297b29b94308838c2ed3e44a
Parents: 2496c76
Author: Fil Maj <ma...@gmail.com>
Authored: Wed Jul 11 16:32:08 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Wed Jul 11 16:32:08 2012 -0700
----------------------------------------------------------------------
lib/ios/exec.js | 2 +-
lib/ios/platform.js | 3 ---
lib/ios/plugin/ios/device.js | 31 -------------------------------
3 files changed, 1 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/58b299e1/lib/ios/exec.js
----------------------------------------------------------------------
diff --git a/lib/ios/exec.js b/lib/ios/exec.js
index 0a81880..d3e4ec4 100644
--- a/lib/ios/exec.js
+++ b/lib/ios/exec.js
@@ -19,7 +19,7 @@ var cordova = require('cordova'),
channel = require('cordova/channel');
module.exports = function() {
- if (!channel.onCordovaInfoReady.fired) {
+ if (!channel.onCordovaReady.fired) {
utils.alert("ERROR: Attempting to call cordova.exec()" +
" before 'deviceready'. Ignoring.");
return;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/58b299e1/lib/ios/platform.js
----------------------------------------------------------------------
diff --git a/lib/ios/platform.js b/lib/ios/platform.js
index 128b2c2..8a70428 100644
--- a/lib/ios/platform.js
+++ b/lib/ios/platform.js
@@ -16,9 +16,6 @@ module.exports = {
MediaError: { // exists natively, override
path: "cordova/plugin/MediaError"
},
- device: {
- path: 'cordova/plugin/ios/device'
- },
console: {
path: 'cordova/plugin/ios/console'
}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/58b299e1/lib/ios/plugin/ios/device.js
----------------------------------------------------------------------
diff --git a/lib/ios/plugin/ios/device.js b/lib/ios/plugin/ios/device.js
deleted file mode 100644
index 37cba07..0000000
--- a/lib/ios/plugin/ios/device.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-var exec = require('cordova/exec'),
- utils = require('cordova/utils'),
- channel = require('cordova/channel');
-
-var Device = function() {
- this.platform = null;
- this.version = null;
- this.name = null;
- this.cordova = null;
- this.uuid = null;
-};
-
-Device.prototype.setInfo = function(info) {
- try {
- this.platform = info.platform;
- this.version = info.version;
- this.name = info.name;
- this.cordova = info.cordova;
- this.uuid = info.uuid;
- channel.onCordovaInfoReady.fire();
- } catch(e) {
- utils.alert('Error during device info setting in cordova/plugin/ios/device!');
- }
-};
-
-module.exports = new Device();