You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2014/06/05 14:32:06 UTC

[1/9] git commit: not forcing the look of the inAppBrowserWrap and buttons

Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master 393524a3e -> 384d3fb8a


not forcing the look of the inAppBrowserWrap and buttons


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/282fdb7a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/282fdb7a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/282fdb7a

Branch: refs/heads/master
Commit: 282fdb7a400176c8b89fa85a5a7148f7d229b021
Parents: 88f330a
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Apr 24 10:51:06 2014 -0400
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Apr 24 10:51:06 2014 -0400

----------------------------------------------------------------------
 doc/index.md                       | 19 +++++++++++++++++++
 src/firefoxos/InAppBrowserProxy.js |  5 +----
 2 files changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/282fdb7a/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index ebc4734..8696c93 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -91,6 +91,7 @@ instance, or the system browser.
 - Amazon Fire OS
 - Android
 - BlackBerry 10
+- Firefox OS
 - iOS
 - Windows Phone 7 and 8
 
@@ -99,6 +100,23 @@ instance, or the system browser.
     var ref = window.open('http://apache.org', '_blank', 'location=yes');
     var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
 
+### Firefox OS Quirks
+
+As plugin doesn't enforce any design there is a need to add some CSS rules if 
+opened with `target` `'_blank'`. The rules might look like these
+
+``` css
+.inappbrowser-wrap {
+	background-color: rgba(0,0,0,0.75);
+	color: rgba(235,235,235,1.0);
+}
+.inappbrowser-wrap p {
+	padding-top: 10px;
+	text-align: center;
+}
+```
+
+
 ## InAppBrowser
 
 The object returned from a call to `window.open`.
@@ -196,6 +214,7 @@ The function is passed an `InAppBrowserEvent` object.
 
 - Amazon Fire OS
 - Android
+- Firefox OS
 - iOS
 - Windows Phone 7 and 8
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/282fdb7a/src/firefoxos/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/InAppBrowserProxy.js b/src/firefoxos/InAppBrowserProxy.js
index 8ee3736..85ea5b9 100644
--- a/src/firefoxos/InAppBrowserProxy.js
+++ b/src/firefoxos/InAppBrowserProxy.js
@@ -63,9 +63,8 @@ var IABExecs = {
                 document.body.removeChild(browserWrap);
             }
             browserWrap = document.createElement('div');
+            browserWrap.classList.add('inappbrowser-wrap');
             browserWrap.style.position = 'absolute';
-            browserWrap.style.backgroundColor = 'rgba(0,0,0,0.75)';
-            browserWrap.style.color = 'rgba(235,235,235,1.0)';
             browserWrap.style.width = window.innerWidth + 'px';
             browserWrap.style.height = window.innerHeight + 'px';
             browserWrap.style.padding = '10px,0,0,0';
@@ -83,8 +82,6 @@ var IABExecs = {
             var p = document.createElement('p');
             p.appendChild(document.createTextNode('close'));
             // TODO: make all buttons - ← → ×
-            p.style.paddingTop = '10px';
-            p.style.textAlign = 'center';
             browserWrap.appendChild(p);
             browserWrap.appendChild(browserElem);
             document.body.appendChild(browserWrap);


[2/9] git commit: back/forward buttons added, iframe has no border

Posted by za...@apache.org.
back/forward buttons added, iframe has no border


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

Branch: refs/heads/master
Commit: 7b24dcb3ddf86bb3dd4423ed7d0904aa786abe03
Parents: 282fdb7
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Apr 24 14:14:41 2014 -0400
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Apr 24 14:14:41 2014 -0400

----------------------------------------------------------------------
 src/firefoxos/InAppBrowserProxy.js | 97 ++++++++++++++++++++++++++++-----
 1 file changed, 82 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/7b24dcb3/src/firefoxos/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/InAppBrowserProxy.js b/src/firefoxos/InAppBrowserProxy.js
index 85ea5b9..1427ea0 100644
--- a/src/firefoxos/InAppBrowserProxy.js
+++ b/src/firefoxos/InAppBrowserProxy.js
@@ -47,10 +47,35 @@ var IABExecs = {
     open: function (win, lose, args) {
         var strUrl = args[0],
             target = args[1],
-            features = args[2],
+            features_string = args[2],
+            features = {},
             url,
             elem;
 
+        var features_list = features_string.split(',');
+        features_list.forEach(function(feature) {
+            var tup = feature.split('=');
+            if (tup[1] == 'yes') {
+                tup[1] = true;
+            } else if (tup[1] == 'no') {
+                tup[1] = false;
+            } else {
+                var number = parseInt(tup[1]);    
+                if (!isNaN(number)) {
+                    tup[1] = number;
+                }
+            }
+            features[tup[0]] = tup[1];
+        });
+
+        function updateIframeSizeNoLocation() {
+            console.log('hey');
+            browserWrap.style.width = window.innerWidth + 'px';
+            browserWrap.style.height = window.innerHeight + 'px';
+            browserWrap.browser.style.height = (window.innerHeight - 60) + 'px';
+            browserWrap.browser.style.width = browserWrap.style.width;
+        }
+
         if (target === '_system') {
             origOpenFunc.apply(window, [strUrl, '_blank']);
         } else if (target === '_blank') {
@@ -63,31 +88,73 @@ var IABExecs = {
                 document.body.removeChild(browserWrap);
             }
             browserWrap = document.createElement('div');
-            browserWrap.classList.add('inappbrowser-wrap');
+            // assign browser element to browserWrap for future reference
+            browserWrap.browser = browserElem;
+
+            browserWrap.classList.add('inAppBrowserWrap');
             browserWrap.style.position = 'absolute';
-            browserWrap.style.width = window.innerWidth + 'px';
-            browserWrap.style.height = window.innerHeight + 'px';
-            browserWrap.style.padding = '10px,0,0,0';
             browserElem.style.position = 'absolute';
+            browserElem.style.border = 0;
             browserElem.style.top = '60px';
             browserElem.style.left = '0px';
-            browserElem.style.height = (window.innerHeight - 60) + 'px';
-            browserElem.style.width = browserWrap.style.width;
+            updateIframeSizeNoLocation();
+
+            var menu = document.createElement('menu');
+            menu.setAttribute('type', 'toolbar');
+            var close = document.createElement('li');
+            var back = document.createElement('li');
+            var forward = document.createElement('li');
 
-            browserWrap.addEventListener('click', function () {
+            close.appendChild(document.createTextNode('×'));
+            back.appendChild(document.createTextNode('<'));
+            forward.appendChild(document.createTextNode('>'));
+
+            close.classList.add('inAppBrowserClose');
+            back.classList.add('inAppBrowserBack');
+            forward.classList.add('inAppBrowserForward');
+
+            function checkForwardBackward() {
+                var backReq = browserElem.getCanGoBack();
+                backReq.onsuccess = function() {
+                    if (this.result) {
+                        back.classList.remove('disabled');
+                    } else {
+                        back.classList.add('disabled');
+                    }
+                }
+                var forwardReq = browserElem.getCanGoForward();
+                forwardReq.onsuccess = function() {
+                    if (this.result) {
+                        forward.classList.remove('disabled');
+                    } else {
+                        forward.classList.add('disabled');
+                    }
+                }
+            };
+
+            browserElem.addEventListener('mozbrowserloadend', checkForwardBackward);
+
+            close.addEventListener('click', function () {
                 setTimeout(function () {
                     IABExecs.close();
                 }, 0);
             }, false);
-            var p = document.createElement('p');
-            p.appendChild(document.createTextNode('close'));
-            // TODO: make all buttons - ← → ×
-            browserWrap.appendChild(p);
+
+            back.addEventListener('click', function () {
+                browserElem.goBack();
+            }, false);
+
+            forward.addEventListener('click', function () {
+                browserElem.goForward();
+            }, false);
+
+            menu.appendChild(back);
+            menu.appendChild(forward);
+            menu.appendChild(close);
+
+            browserWrap.appendChild(menu);
             browserWrap.appendChild(browserElem);
             document.body.appendChild(browserWrap);
-            // assign browser element to browserWrap for future
-            // reference
-            browserWrap.browser = browserElem;
         } else {
             window.location = strUrl;
         }


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

Posted by za...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-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/384d3fb8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/384d3fb8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/384d3fb8

Branch: refs/heads/master
Commit: 384d3fb8a6a7494f0a0e58bd4bff2e2b96042985
Parents: f9c235c 393524a
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Jun 5 14:31:47 2014 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Jun 5 14:31:47 2014 +0200

----------------------------------------------------------------------
 doc/de/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/es/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/fr/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/it/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/ja/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/ko/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/pl/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 doc/zh/index.md           | 299 +++++++++++++++++++++++++++++++++++++++++
 src/ios/CDVInAppBrowser.h |   3 +-
 src/ios/CDVInAppBrowser.m |  43 +++---
 10 files changed, 2416 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[6/9] git commit: default parameter added

Posted by za...@apache.org.
default parameter added


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/846190a6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/846190a6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/846190a6

Branch: refs/heads/master
Commit: 846190a6f84a7f2ad01d36b3d1b78589aac1b8af
Parents: cd7916d
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Wed Jun 4 15:24:21 2014 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Wed Jun 4 15:24:21 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/846190a6/src/firefoxos/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/InAppBrowserProxy.js b/src/firefoxos/InAppBrowserProxy.js
index f05689d..846f57a 100644
--- a/src/firefoxos/InAppBrowserProxy.js
+++ b/src/firefoxos/InAppBrowserProxy.js
@@ -47,7 +47,7 @@ var IABExecs = {
     open: function (win, lose, args) {
         var strUrl = args[0],
             target = args[1],
-            features_string = args[2],
+            features_string = args[2] || "location=yes", //location=yes is default
             features = {},
             url,
             elem;


[3/9] git commit: console.log removed

Posted by za...@apache.org.
console.log removed


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

Branch: refs/heads/master
Commit: a6cd0a16ba034cda28c93dafa01c45929bef8eb1
Parents: 7b24dcb
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Apr 24 15:01:09 2014 -0400
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Apr 24 15:01:09 2014 -0400

----------------------------------------------------------------------
 src/firefoxos/InAppBrowserProxy.js | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/a6cd0a16/src/firefoxos/InAppBrowserProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/InAppBrowserProxy.js b/src/firefoxos/InAppBrowserProxy.js
index 1427ea0..f05689d 100644
--- a/src/firefoxos/InAppBrowserProxy.js
+++ b/src/firefoxos/InAppBrowserProxy.js
@@ -69,7 +69,6 @@ var IABExecs = {
         });
 
         function updateIframeSizeNoLocation() {
-            console.log('hey');
             browserWrap.style.width = window.innerWidth + 'px';
             browserWrap.style.height = window.innerHeight + 'px';
             browserWrap.browser.style.height = (window.innerHeight - 60) + 'px';


[7/9] git commit: after code review

Posted by za...@apache.org.
after code review


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

Branch: refs/heads/master
Commit: df001e2765a512bc2b9c7e5d730f438556112067
Parents: 846190a
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Jun 5 13:03:51 2014 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Jun 5 13:03:51 2014 +0200

----------------------------------------------------------------------
 doc/index.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/df001e27/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 1106457..d59cd99 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -94,7 +94,7 @@ instance, or the system browser.
 ### Firefox OS Quirks
 
 As plugin doesn't enforce any design there is a need to add some CSS rules if 
-opened with `target` `'_blank'`. The rules might look like these
+opened with `target='_blank'`. The rules might look like these
 
 ``` css
 .inAppBrowserWrap {
@@ -110,7 +110,6 @@ opened with `target` `'_blank'`. The rules might look like these
   font-size: 25px;
   height: 25px;
   float: left;
-  margin-right: 0px;
   margin: 0 10px;
   padding: 3px 10px;
   text-decoration: none;


[4/9] git commit: doc updated

Posted by za...@apache.org.
doc updated


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

Branch: refs/heads/master
Commit: 527046261134c15007a6c3268e0789d1edce5cbc
Parents: a6cd0a1
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Apr 24 15:03:33 2014 -0400
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Apr 24 15:03:33 2014 -0400

----------------------------------------------------------------------
 doc/index.md | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/52704626/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 8696c93..1f4f3ba 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -106,13 +106,29 @@ As plugin doesn't enforce any design there is a need to add some CSS rules if
 opened with `target` `'_blank'`. The rules might look like these
 
 ``` css
-.inappbrowser-wrap {
-	background-color: rgba(0,0,0,0.75);
-	color: rgba(235,235,235,1.0);
+.inAppBrowserWrap {
+  background-color: rgba(0,0,0,0.75);
+  color: rgba(235,235,235,1.0);
 }
-.inappbrowser-wrap p {
-	padding-top: 10px;
-	text-align: center;
+.inAppBrowserWrap menu {
+  overflow: auto;
+  list-style-type: none;
+  padding-left: 0;
+}
+.inAppBrowserWrap menu li {
+  font-size: 25px;
+  height: 25px;
+  float: left;
+  margin-right: 0px;
+  margin: 0 10px;
+  padding: 3px 10px;
+  text-decoration: none;
+  color: #ccc;
+  display: block;
+  background: rgba(30,30,30,0.50);
+}
+.inAppBrowserWrap menu li.disabled {
+	color: #777;
 }
 ```
 


[8/9] git commit: Merge branch 'react_on_features'

Posted by za...@apache.org.
Merge branch 'react_on_features'


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

Branch: refs/heads/master
Commit: f9c235caf527f3502bcbafe58064d3c5876a8290
Parents: 75cadab df001e2
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Jun 5 14:31:19 2014 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Jun 5 14:31:19 2014 +0200

----------------------------------------------------------------------
 doc/index.md                       | 34 +++++++++++
 src/firefoxos/InAppBrowserProxy.js | 99 +++++++++++++++++++++++++++------
 2 files changed, 115 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[5/9] git commit: Merge remote-tracking branch 'rodrigo/auto-permission' into react_on_features

Posted by za...@apache.org.
Merge remote-tracking branch 'rodrigo/auto-permission' into react_on_features


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

Branch: refs/heads/master
Commit: cd7916d0256b5d1e757cc6dcffdc48d320e53866
Parents: 5270462 8fea6be
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Wed Jun 4 14:47:48 2014 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Wed Jun 4 14:47:48 2014 +0200

----------------------------------------------------------------------
 CONTRIBUTING.md                    |  16 +++
 RELEASENOTES.md                    |  14 +++
 doc/index.md                       |  13 +--
 plugin.xml                         |  31 +++++-
 src/amazon/InAppChromeClient.java  |  18 ++++
 src/android/InAppChromeClient.java |  18 ++++
 src/blackberry10/README.md         |  18 ++++
 src/ios/CDVInAppBrowser.h          |  10 +-
 src/ios/CDVInAppBrowser.m          |  77 ++++++++++++--
 src/wp/InAppBrowser.cs             | 183 +++++++++++++++++++++++++-------
 www/inappbrowser.js                |   2 +
 www/windows8/InAppBrowserProxy.js  |   2 +-
 12 files changed, 342 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/cd7916d0/doc/index.md
----------------------------------------------------------------------