incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tim...@apache.org
Subject js commit: [CB-1114] - fixed playbook's device class
Date Tue, 24 Jul 2012 19:57:51 GMT
Updated Branches:
  refs/heads/master 095dbb80b -> 7dd17b005


[CB-1114] - fixed playbook's device class


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

Branch: refs/heads/master
Commit: 7dd17b00544742d14ecdeff2148a66480680f12b
Parents: 095dbb8
Author: Tim Kim <tim.kim@nitobi.com>
Authored: Tue Jul 24 12:57:43 2012 -0700
Committer: Tim Kim <tim.kim@nitobi.com>
Committed: Tue Jul 24 12:57:43 2012 -0700

----------------------------------------------------------------------
 lib/playbook/platform.js               |   10 ----------
 lib/playbook/plugin/manager.js         |    1 +
 lib/playbook/plugin/playbook/device.js |   24 +++++++++++++++---------
 3 files changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/7dd17b00/lib/playbook/platform.js
----------------------------------------------------------------------
diff --git a/lib/playbook/platform.js b/lib/playbook/platform.js
index bb38e30..69ba8c8 100644
--- a/lib/playbook/platform.js
+++ b/lib/playbook/platform.js
@@ -2,9 +2,6 @@ module.exports = {
     id: "playbook",
     initialize:function() {},
     objects: {
-        device: {
-            path: "cordova/plugin/playbook/device"
-        },
         DirectoryReader:{
             path: 'cordova/plugin/playbook/DirectoryReader'
         },
@@ -25,13 +22,6 @@ module.exports = {
         }
     },
     merges: {
-        navigator: {
-            children: {
-                device: {
-                    path: "cordova/plugin/playbook/device"
-                }
-            }
-        },
         DirectoryEntry: {
             path: 'cordova/plugin/playbook/DirectoryEntry'
         },

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/7dd17b00/lib/playbook/plugin/manager.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/manager.js b/lib/playbook/plugin/manager.js
index 2385cc3..8140162 100644
--- a/lib/playbook/plugin/manager.js
+++ b/lib/playbook/plugin/manager.js
@@ -1,5 +1,6 @@
 var cordova = require('cordova'),
     plugins = {
+        'Device' : require('cordova/plugin/playbook/device'),
         'Battery' : require('cordova/plugin/playbook/battery'),
         'Camera' : require('cordova/plugin/playbook/camera'),
         'Logger' : require('cordova/plugin/playbook/logger'),

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/7dd17b00/lib/playbook/plugin/playbook/device.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/device.js b/lib/playbook/plugin/playbook/device.js
index fc977a2..a42191e 100644
--- a/lib/playbook/plugin/playbook/device.js
+++ b/lib/playbook/plugin/playbook/device.js
@@ -1,14 +1,20 @@
-var channel = require('cordova/channel');
+var channel = require('cordova/channel'),
+    cordova = require('cordova');
 
 // Tell cordova channel to wait on the CordovaInfoReady event
 channel.waitForInitialization('onCordovaInfoReady');
 
 module.exports = {
-    platform: "PlayBook",
-    version: blackberry.system.softwareVersion,
-    name: blackberry.system.model,
-    uuid: blackberry.identity.PIN,
-    cordova: "2.0.0"
-};
-
-channel.onCordovaInfoReady.fire();
+    getDeviceInfo : function(args, win, fail){
+        win({
+            platform: "PlayBook",
+            version: blackberry.system.softwareVersion,
+            name: blackberry.system.model,
+            uuid: blackberry.identity.PIN,
+            cordova: "2.0.0"
+        });
+
+        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned"
};
+    }
+
+};
\ No newline at end of file


Mime
View raw message