Compare commits

..

16 Commits
0.5.2 ... 0.5.3

Author SHA1 Message Date
Steven Gill
7ae4130296 Updated version and RELEASENOTES.md for release 0.5.3 2014-10-03 16:10:13 -07:00
sgrebnov
32c0e41c43 Windows implementation fixes and improvements 2014-09-19 10:33:53 +04:00
Piotr Zalewa
43592a4789 Merge branch 'fix_zindex' 2014-09-19 07:52:56 +02:00
Piotr Zalewa
4b3a838704 zIndex fixed 2014-09-19 07:51:42 +02:00
Jesse MacFadyen
ac0bdee8e6 renamed InAppBrowser back to inappbrowser for case sensitive operating systems 2014-09-18 16:52:40 -07:00
Jesse MacFadyen
22b3f0ccd4 Merge branch 'CB-5109' of https://github.com/Touchit/cordova-plugin-inappbrowser 2014-09-18 16:44:04 -07:00
Marcel Kinard
6e0ea336fc CB-7571 Bump version of nested plugin to match parent plugin 2014-09-17 16:27:16 -04:00
Marcel Kinard
f47f5449c2 CB-7571 Incremented plugin version. 2014-09-17 15:35:02 -04:00
SomaticIT
d828197de4 Clean plugin.xml 2014-07-11 21:54:25 +02:00
SomaticIT
6e38667320 Update french translation 2014-07-11 21:48:31 +02:00
SomaticIT
ea6a4fc80a Update doc to add Windows 8 2014-07-11 21:48:21 +02:00
SomaticIT
ac9c64964e Update windows proxy to be both compatible with windows 8 and 8.1 2014-07-11 21:43:37 +02:00
SomaticIT
225bde271b Rename windows81 by windows8 in src directory 2014-07-11 17:06:39 +02:00
SomaticIT
e5d07f14e8 Update code from remote apache repository 2014-07-11 17:05:24 +02:00
SomaticIT
863386398e Append Windows 8.1 platform configuration in plugin.xml 2013-10-17 23:02:59 +02:00
SomaticIT
ef9ca5ad3e Append Windows 8.1 proxy using x-ms-webview 2013-10-17 23:01:13 +02:00
7 changed files with 211 additions and 11 deletions

View File

@@ -130,6 +130,17 @@
* CB-7133 fix up the tests for Android
* Add just a bit more logging
* CB-7133 port inappbrowser to plugin-test-framework
* phonegap events supported for _blank target
* inappbrowser _blank target position is fixed
* phonegap events supported for \_blank target
* inappbrowser \_blank target position is fixed
* amazon-fireos related changes.
### 0.5.3 (Oct 03, 2014)
* Windows implementation fixes and improvements
* zIndex fixed
* renamed InAppBrowser back to inappbrowser for case sensitive operating systems
* Update french translation
* Update doc to add Windows 8
* Update windows proxy to be both compatible with windows 8 and 8.1
* Rename windows81 by windows8 in src directory
* Append Windows 8.1 platform configuration in plugin.xml
* Append Windows 8.1 proxy using x-ms-webview

View File

@@ -57,7 +57,7 @@ Ouvre une URL dans une nouvelle `InAppBrowser` instance, l'instance de navigateu
Android uniquement :
* **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton.
* **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement.
* **hidden**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement.
* **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre
* **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre
@@ -65,7 +65,7 @@ Ouvre une URL dans une nouvelle `InAppBrowser` instance, l'instance de navigateu
* **closebuttoncaption**: affectez une chaîne à utiliser comme la **fait** légende du bouton. Notez que vous devrez localiser cette valeur vous-même.
* **disallowoverscroll**: la valeur `yes` ou `no` (valeur par défaut est `no` ). Active/désactive la propriété UIWebViewBounce.
* **caché**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement.
* **hidden**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement.
* **ClearCache**: la valeur `yes` pour que le navigateur du cache de cookie effacé, avant l'ouverture de la nouvelle fenêtre
* **clearsessioncache**: la valeur `yes` pour avoir le cache de cookie de session autorisé avant l'ouverture de la nouvelle fenêtre
* **barre d'outils**: la valeur `yes` ou `no` pour activer la barre d'outils ou désactiver pour le InAppBrowser (par défaut,`yes`)
@@ -77,6 +77,10 @@ Ouvre une URL dans une nouvelle `InAppBrowser` instance, l'instance de navigateu
* **presentationstyle**: la valeur `pagesheet` , `formsheet` ou `fullscreen` pour définir le [style de présentation][1] (par défaut,`fullscreen`).
* **transitionstyle**: la valeur `fliphorizontal` , `crossdissolve` ou `coververtical` pour définir le [style de transition][2] (par défaut,`coververtical`).
* **toolbarposition**: la valeur `top` ou `bottom` (valeur par défaut est `bottom` ). Causes de la barre d'outils être en haut ou en bas de la fenêtre.
Windows uniquement :
* **hidden**: la valeur `yes` pour créer le navigateur et charger la page, mais ne pas le montrer. L'événement loadstop est déclenché lorsque le chargement est terminé. Omettre ou la valeur `no` (par défaut) pour que le navigateur ouvrir et charger normalement.
[1]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle
[2]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle
@@ -88,6 +92,7 @@ Ouvre une URL dans une nouvelle `InAppBrowser` instance, l'instance de navigateu
* BlackBerry 10
* Firefox OS
* iOS
* Windows 8 et 8.1
* Windows Phone 7 et 8
### Exemple
@@ -172,6 +177,7 @@ L'objet retourné par un appel à`window.open`.
* Amazon Fire OS
* Android
* iOS
* Windows 8 et 8.1
* Windows Phone 7 et 8
### Petit exemple
@@ -203,6 +209,7 @@ L'objet retourné par un appel à`window.open`.
* Amazon Fire OS
* Android
* iOS
* Windows 8 et 8.1
* Windows Phone 7 et 8
### Petit exemple
@@ -228,6 +235,7 @@ L'objet retourné par un appel à`window.open`.
* Android
* Firefox OS
* iOS
* Windows 8 et 8.1
* Windows Phone 7 et 8
### Petit exemple
@@ -250,6 +258,7 @@ L'objet retourné par un appel à`window.open`.
* Amazon Fire OS
* Android
* iOS
* Windows 8 et 8.1
### Petit exemple
@@ -281,6 +290,7 @@ L'objet retourné par un appel à`window.open`.
* Amazon Fire OS
* Android
* iOS
* Windows 8 et 8.1
### Petit exemple

View File

@@ -77,6 +77,10 @@ instance, or the system browser.
- __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`).
- __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window.
Windows only:
- __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally.
### Supported Platforms
- Amazon Fire OS
@@ -84,6 +88,7 @@ instance, or the system browser.
- BlackBerry 10
- Firefox OS
- iOS
- Windows 8 and 8.1
- Windows Phone 7 and 8
### Example
@@ -169,6 +174,7 @@ The object returned from a call to `window.open`.
- Amazon Fire OS
- Android
- iOS
- Windows 8 and 8.1
- Windows Phone 7 and 8
### Quick Example
@@ -199,6 +205,7 @@ The function is passed an `InAppBrowserEvent` object.
- Amazon Fire OS
- Android
- iOS
- Windows 8 and 8.1
- Windows Phone 7 and 8
### Quick Example
@@ -222,6 +229,7 @@ The function is passed an `InAppBrowserEvent` object.
- Android
- Firefox OS
- iOS
- Windows 8 and 8.1
- Windows Phone 7 and 8
### Quick Example
@@ -242,6 +250,7 @@ The function is passed an `InAppBrowserEvent` object.
- Amazon Fire OS
- Android
- iOS
- Windows 8 and 8.1
### Quick Example
@@ -273,6 +282,7 @@ The function is passed an `InAppBrowserEvent` object.
- Amazon Fire OS
- Android
- iOS
- Windows 8 and 8.1
### Quick Example

View File

@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.inappbrowser"
version="0.5.2">
version="0.5.3">
<name>InAppBrowser</name>
<description>Cordova InAppBrowser Plugin</description>
@@ -32,7 +32,7 @@
<engines>
<engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil -->
</engines>
<!-- android -->
<platform name="android">
<js-module src="www/inappbrowser.js" name="inappbrowser">
@@ -65,7 +65,7 @@
<resource-file src="src/android/res/drawable-xxhdpi/ic_action_remove.png" target="res/drawable-xxhdpi/ic_action_remove.png" />
</platform>
<!-- amazon-fireos -->
<platform name="amazon-fireos">
<js-module src="www/inappbrowser.js" name="inappbrowser">
@@ -97,7 +97,7 @@
<resource-file src="src/android/res/drawable-xhdpi/ic_action_remove.png" target="res/drawable-xhdpi/ic_action_remove.png" />
<resource-file src="src/android/res/drawable-xxhdpi/ic_action_remove.png" target="res/drawable-xxhdpi/ic_action_remove.png" />
</platform>
<!-- ubuntu -->
<platform name="ubuntu">
<js-module src="www/inappbrowser.js" name="inappbrowser">
@@ -179,7 +179,17 @@
<merges target="" />
</js-module>
</platform>
<!-- windows universal apps (Windows 8.1, Windows Phone 8.1, Windows 8.0) -->
<platform name="windows">
<js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="window.open" />
</js-module>
<js-module src="src/windows/InAppBrowserProxy.js" name="InAppBrowserProxy">
<merges target="" />
</js-module>
</platform>
<!-- firefoxos -->
<platform name="firefoxos">
<config-file target="config.xml" parent="/*">
@@ -191,6 +201,6 @@
<js-module src="src/firefoxos/InAppBrowserProxy.js" name="InAppBrowserProxy">
<merges target="" />
</js-module>
</platform>
</platform>
</plugin>

View File

@@ -72,6 +72,7 @@ var IABExecs = {
function updateIframeSizeNoLocation() {
browserWrap.style.width = window.innerWidth + 'px';
browserWrap.style.height = window.innerHeight + 'px';
browserWrap.style.zIndex = '999999999';
browserWrap.browser.style.height = (window.innerHeight - 60) + 'px';
browserWrap.browser.style.width = browserWrap.style.width;
}

View File

@@ -0,0 +1,158 @@
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/*jslint sloppy:true */
/*global Windows:true, require, document, setTimeout, window, module */
var cordova = require('cordova'),
channel = require('cordova/channel');
var browserWrap,
popup;
// x-ms-webview is available starting from Windows 8.1 (platformId is 'windows')
// http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx
var isWebViewAvailable = cordova.platformId == 'windows';
function attachNavigationEvents(element, callback) {
if (isWebViewAvailable) {
element.addEventListener("MSWebViewNavigationStarting", function (e) {
callback({ type: "loadstart", url: e.uri}, {keepCallback: true} );
});
element.addEventListener("MSWebViewNavigationCompleted", function (e) {
callback({ type: e.isSuccess ? "loadstop" : "loaderror", url: e.uri}, {keepCallback: true});
});
element.addEventListener("MSWebViewUnviewableContentIdentified", function (e) {
// WebView found the content to be not HTML.
// http://msdn.microsoft.com/en-us/library/windows/apps/dn609716.aspx
callback({ type: "loaderror", url: e.uri}, {keepCallback: true});
});
} else {
var onError = function () {
callback({ type: "loaderror", url: this.contentWindow.location}, {keepCallback: true});
};
element.addEventListener("unload", function () {
callback({ type: "loadstart", url: this.contentWindow.location}, {keepCallback: true});
});
element.addEventListener("load", function () {
callback({ type: "loadstop", url: this.contentWindow.location}, {keepCallback: true});
});
element.addEventListener("error", onError);
element.addEventListener("abort", onError);
}
}
var IAB = {
close: function (win, lose) {
if (browserWrap) {
if (win) win({ type: "exit" });
browserWrap.parentNode.removeChild(browserWrap);
browserWrap = null;
popup = null;
}
},
show: function (win, lose) {
if (browserWrap) {
browserWrap.style.display = "block";
}
},
open: function (win, lose, args) {
var strUrl = args[0],
target = args[1],
features = args[2],
url;
if (target === "_system") {
url = new Windows.Foundation.Uri(strUrl);
Windows.System.Launcher.launchUriAsync(url);
} else if (target === "_blank") {
if (!browserWrap) {
browserWrap = document.createElement("div");
browserWrap.style.position = "absolute";
browserWrap.style.borderWidth = "40px";
browserWrap.style.width = "calc(100% - 80px)";
browserWrap.style.height = "calc(100% - 80px)";
browserWrap.style.borderStyle = "solid";
browserWrap.style.borderColor = "rgba(0,0,0,0.25)";
browserWrap.onclick = function () {
setTimeout(function () {
IAB.close();
}, 0);
};
document.body.appendChild(browserWrap);
}
if (features.indexOf("hidden=yes") !== -1) {
browserWrap.style.display = "none";
}
popup = document.createElement(isWebViewAvailable ? "x-ms-webview" : "iframe");
popup.style.borderWidth = "0px";
popup.style.width = "100%";
popup.style.height = "100%";
popup.src = strUrl;
// start listening for navigation events
attachNavigationEvents(popup, win);
browserWrap.appendChild(popup);
} else {
window.location = strUrl;
}
},
injectScriptCode: function (win, fail, args) {
var code = args[0],
hasCallback = args[1];
if (isWebViewAvailable && browserWrap && popup) {
var op = popup.invokeScriptAsync("eval", code);
op.oncomplete = function () { hasCallback && win([]); };
op.onerror = function () { };
op.start();
}
},
injectScriptFile: function (win, fail, args) {
var file = args[0],
hasCallback = args[1];
if (isWebViewAvailable && browserWrap && popup) {
Windows.Storage.FileIO.readTextAsync(file).done(function (code) {
var op = popup.invokeScriptAsync("eval", code);
op.oncomplete = function () { hasCallback && win([]); };
op.onerror = function () { };
op.start();
});
}
}
};
module.exports = IAB;
require("cordova/exec/proxy").add("InAppBrowser", module.exports);

View File

@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.inappbrowser.tests"
version="0.5.2">
version="0.5.3">
<name>Cordova InAppBrowser Plugin Tests</name>
<license>Apache 2.0</license>