You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/12/15 00:54:11 UTC

[1/3] git commit: updates for 2.3.0rc2

Updated Branches:
  refs/heads/master b32dd22ce -> eb721c8a5
Updated Tags:  refs/tags/2.3.0rc2 [created] eb721c8a5


updates for 2.3.0rc2


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/eb721c8a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/eb721c8a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/eb721c8a

Branch: refs/heads/master
Commit: eb721c8a501ed939363a1b0efeebac5658b0007e
Parents: b32dd22
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Dec 14 15:39:28 2012 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Dec 14 15:39:28 2012 -0800

----------------------------------------------------------------------
 windows8/VERSION                                   |    2 +-
 windows8/cordova-2.3.0.js                          |   57 +-
 .../Template-Cordova/js/cordova.windows8.js        | 2453 ++++++++-------
 .../samples/Media_Test/Media_Test/cordova-2.3.0.js |   57 +-
 .../Notification Test/cordova-2.3.0.js             |   57 +-
 windows8/template/www/cordova-2.3.0.js             |   57 +-
 windows8/test/CordovaTestApp.jsproj                |    2 +-
 windows8/test/cordova-2.3.0.js                     |   57 +-
 windows8/test/package.appxmanifest                 |    2 +-
 9 files changed, 1636 insertions(+), 1108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/eb721c8a/windows8/VERSION
----------------------------------------------------------------------
diff --git a/windows8/VERSION b/windows8/VERSION
index e3a4f19..1d0743a 100644
--- a/windows8/VERSION
+++ b/windows8/VERSION
@@ -1 +1 @@
-2.2.0
\ No newline at end of file
+2.3.0rc2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/eb721c8a/windows8/cordova-2.3.0.js
----------------------------------------------------------------------
diff --git a/windows8/cordova-2.3.0.js b/windows8/cordova-2.3.0.js
index f2378f3..f7c6891 100644
--- a/windows8/cordova-2.3.0.js
+++ b/windows8/cordova-2.3.0.js
@@ -1,6 +1,6 @@
-// commit c46b14085ce80cda5f72d6af22bc22afe4c2151d
+// commit 861ff3d507fd5c64ed789d8abe360690e588252e
 
-// File generated at :: Mon Nov 26 2012 15:31:35 GMT-0800 (Pacific Standard Time)
+// File generated at :: Fri Dec 14 2012 15:28:53 GMT-0800 (Pacific Standard Time)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -3145,18 +3145,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
 
 var exec = require('cordova/exec');
 
-var InAppBrowser = {
-    open : function(strUrl, strWindowName, strWindowFeatures) {
-        exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
-        return InAppBrowser;
-    },
-    close : function() {
-        exec(null, null, "InAppBrowser", "close", []);
+function InAppBrowser()
+{
+   var _channel = require('cordova/channel');
+   this.channels = {
+        'loadstart': _channel.create('loadstart'),
+        'loadstop' : _channel.create('loadstop'),
+        'exit' : _channel.create('exit')
+   };
+}
+
+InAppBrowser.prototype._eventHandler = function(event)
+{
+    if (event.type in this.channels) {
+        this.channels[event.type].fire(event);
     }
-};
+}
+
+InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)
+{
+    var iab = new InAppBrowser();
+    var cb = function(eventname) {
+       iab._eventHandler(eventname);
+    }
+    exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+    return iab;
+}
+
+InAppBrowser.prototype.close = function(eventname, f)
+{
+    exec(null, null, "InAppBrowser", "close", []);
+}
+
+InAppBrowser.prototype.addEventListener = function(eventname, f)
+{
+    if (eventname in this.channels) {
+        this.channels[eventname].subscribe(f);
+    }
+}
+
+InAppBrowser.prototype.removeEventListener = function(eventname, f)
+{
+    if (eventname in this.channels) {
+        this.channels[eventname].unsubscribe(f);
+    }
+}
 
 module.exports = InAppBrowser.open;
 
+
 });
 
 // file: lib\common\plugin\LocalFileSystem.js