incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [4/6] js commit: [CB-1013] Updated necessary JS bits for common device module use in iOS
Date Thu, 12 Jul 2012 20:31:41 GMT
[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/master
Commit: 58b299e158a6f280297b29b94308838c2ed3e44a
Parents: 2496c76
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed Jul 11 16:32:08 2012 -0700
Committer: Fil Maj <maj.fil@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();


Mime
View raw message