You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/09/25 16:49:37 UTC

[1/5] git commit: CB-4889 renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser

Updated Branches:
  refs/heads/dev 2dcfafb60 -> 385d7c162


CB-4889 renaming org.apache.cordova.core.inappbrowser to org.apache.cordova.inappbrowser


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/12c485ed
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/12c485ed
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/12c485ed

Branch: refs/heads/dev
Commit: 12c485ede798c1c56caa52ca3c175185c8e45313
Parents: eef27f8
Author: Anis Kadri <an...@apache.org>
Authored: Sat Sep 21 12:30:34 2013 +0200
Committer: Anis Kadri <an...@apache.org>
Committed: Sat Sep 21 12:30:34 2013 +0200

----------------------------------------------------------------------
 plugin.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/12c485ed/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index e1dc47f..7e80af4 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-           id="org.apache.cordova.core.inappbrowser"
-      version="0.2.1-dev">
+           id="org.apache.cordova.inappbrowser"
+      version="0.2.1">
     <name>InAppBrowser</name>
     <description>Cordova InAppBrowser Plugin</description>
     <license>Apache 2.0</license>


[5/5] git commit: Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser into dev

Posted by an...@apache.org.
Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser into dev


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/385d7c16
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/385d7c16
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/385d7c16

Branch: refs/heads/dev
Commit: 385d7c162f0363eba207b99cf07e9247af821545
Parents: de4fd41 2dcfafb
Author: Anis Kadri <an...@apache.org>
Authored: Wed Sep 25 16:49:28 2013 +0200
Committer: Anis Kadri <an...@apache.org>
Committed: Wed Sep 25 16:49:28 2013 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/5] git commit: [windows8] commandProxy was moved

Posted by an...@apache.org.
[windows8] commandProxy was moved


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/1ce5dca6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/1ce5dca6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/1ce5dca6

Branch: refs/heads/dev
Commit: 1ce5dca61a842ca228ca7924c76a88fe75f13011
Parents: 08f66a7
Author: purplecabbage <pu...@gmail.com>
Authored: Tue Sep 24 01:50:54 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Wed Sep 25 16:49:16 2013 +0200

----------------------------------------------------------------------
 www/windows8/InAppBrowserProxy.js | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/1ce5dca6/www/windows8/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/www/windows8/InAppBrowserProxy.js b/www/windows8/InAppBrowserProxy.js
index 273f303..7cb98a7 100644
--- a/www/windows8/InAppBrowserProxy.js
+++ b/www/windows8/InAppBrowserProxy.js
@@ -19,7 +19,7 @@ cordova.define("org.apache.cordova.inappbrowser.InAppBrowserProxy", function(req
  *
 */
 
-/*global Windows:true */  
+/*global Windows:true */
 
 
 
@@ -89,13 +89,8 @@ var IAB = {
             window.location = strUrl;
         }
 
-
-
-        
-
         //var object = new WinJS.UI.HtmlControl(elem, { uri: strUrl });
 
-
     },
 
     injectScriptCode:function(code, bCB) {
@@ -108,10 +103,7 @@ var IAB = {
     }
 };
 
-
-
-
 module.exports = IAB;
 
 
-require("cordova/commandProxy").add("InAppBrowser",IAB);});
+require("cordova/windows8/commandProxy").add("InAppBrowser",module.exports);


[2/5] git commit: CB-4889 renaming core references

Posted by an...@apache.org.
CB-4889 renaming core references


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/08f66a7c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/08f66a7c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/08f66a7c

Branch: refs/heads/dev
Commit: 08f66a7cab5f04b4afebf04c09d80a41895b4d53
Parents: 12c485e
Author: Anis Kadri <an...@apache.org>
Authored: Wed Sep 25 16:48:51 2013 +0200
Committer: Anis Kadri <an...@apache.org>
Committed: Wed Sep 25 16:48:51 2013 +0200

----------------------------------------------------------------------
 www/windows8/InAppBrowserProxy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/08f66a7c/www/windows8/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/www/windows8/InAppBrowserProxy.js b/www/windows8/InAppBrowserProxy.js
index 9928d19..273f303 100644
--- a/www/windows8/InAppBrowserProxy.js
+++ b/www/windows8/InAppBrowserProxy.js
@@ -1,4 +1,4 @@
-cordova.define("org.apache.cordova.core.inappbrowser.InAppBrowserProxy", function(require, exports, module) {  /*
+cordova.define("org.apache.cordova.inappbrowser.InAppBrowserProxy", function(require, exports, module) {  /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file


[4/5] git commit: CB-4788: Modified the onJsPrompt to warn against Cordova calls

Posted by an...@apache.org.
CB-4788: Modified the onJsPrompt to warn against Cordova calls


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

Branch: refs/heads/dev
Commit: de4fd41f8efdcd05c05afe056c593e7df0fc7db5
Parents: 1ce5dca
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Sep 24 14:33:44 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Wed Sep 25 16:49:16 2013 +0200

----------------------------------------------------------------------
 src/android/InAppChromeClient.java | 35 +++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/de4fd41f/src/android/InAppChromeClient.java
----------------------------------------------------------------------
diff --git a/src/android/InAppChromeClient.java b/src/android/InAppChromeClient.java
index 2db73ab..2c240c6 100644
--- a/src/android/InAppChromeClient.java
+++ b/src/android/InAppChromeClient.java
@@ -95,21 +95,30 @@ public class InAppChromeClient extends WebChromeClient {
     @Override
     public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
         // See if the prompt string uses the 'gap-iab' protocol. If so, the remainder should be the id of a callback to execute.
-        if (defaultValue != null && defaultValue.startsWith("gap-iab://")) {
-            PluginResult scriptResult;
-            String scriptCallbackId = defaultValue.substring(10);
-            if (scriptCallbackId.startsWith("InAppBrowser")) {
-                if(message == null || message.length() == 0) {
-                    scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray());
-                } else {
-                    try {
-                        scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message));
-                    } catch(JSONException e) {
-                        scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
+        if (defaultValue != null && defaultValue.startsWith("gap")) {
+            if(defaultValue.startsWith("gap-iab://")) {
+                PluginResult scriptResult;
+                String scriptCallbackId = defaultValue.substring(10);
+                if (scriptCallbackId.startsWith("InAppBrowser")) {
+                    if(message == null || message.length() == 0) {
+                        scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray());
+                    } else {
+                        try {
+                            scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray(message));
+                        } catch(JSONException e) {
+                            scriptResult = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());
+                        }
                     }
+                    this.webView.sendPluginResult(scriptResult, scriptCallbackId);
+                    result.confirm("");
+                    return true;
                 }
-                this.webView.sendPluginResult(scriptResult, scriptCallbackId);
-                result.confirm("");
+            }
+            else
+            {
+                // Anything else with a gap: prefix should get this message
+                LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); 
+                result.cancel();
                 return true;
             }
         }