diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-11-08 12:37:03 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-11-08 12:37:03 -0500 |
| commit | ef4f212fc1482136dba1e690ec589b315b4a377f (patch) | |
| tree | 0b7e16d72567fafcfd3e08d7c5c591ad07a63458 /StoneIsland/plugins/cordova-plugin-inappbrowser/www | |
| parent | 5fa81da81260d65113f57a293b6256d334fe8e2d (diff) | |
build 0.7.0
Diffstat (limited to 'StoneIsland/plugins/cordova-plugin-inappbrowser/www')
| -rw-r--r--[-rwxr-xr-x] | StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css | 74 | ||||
| -rw-r--r--[-rwxr-xr-x] | StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js | 155 | ||||
| -rw-r--r--[-rwxr-xr-x] | StoneIsland/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js | 5 |
3 files changed, 152 insertions, 82 deletions
diff --git a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css index bd1526d3..5762c746 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css +++ b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.css @@ -38,3 +38,77 @@ .inAppBrowserWrapFullscreen { border: 0; } + +.inappbrowser-app-bar { + height: 70px; + background-color: #404040; + z-index: 9999999; +} + +.inappbrowser-app-bar-inner { + padding-top: 10px; + height: 60px; + width: 155px; + margin: 0 auto; + background-color: #404040; + z-index: 9999999; +} + +.app-bar-action { + width: auto; + height: 40px; + margin-left: 20px; + font-family: "Segoe UI Symbol"; + float: left; + color: white; + font-size: 12px; + text-transform: lowercase; + text-align: center; + cursor: default; +} + +.app-bar-action[disabled] { + color: gray; + /*disable click*/ + pointer-events: none; +} + +.app-bar-action::before { + font-size: 28px; + display: block; + height: 36px; +} + +/* Back */ +.action-back { + margin-left: 0px; +} + +.action-back::before { + content: "\E0BA"; +} + +.action-back:not([disabled]):hover::before { + content: "\E0B3"; +} + +/* Forward */ +.action-forward::before { + content: "\E0AC"; +} + +.action-forward:not([disabled]):hover::before { + content: "\E0AF"; +} + +/* Close */ +.action-close::before { + content: "\E0C7"; + /* close icon is larger so we re-size it to fit other icons */ + font-size: 20px; + line-height: 40px; +} + +.action-close:not([disabled]):hover::before { + content: "\E0CA"; +} diff --git a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js index 93eb4207..25f62711 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js +++ b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -19,92 +19,93 @@ * */ -// special patch to correctly work on Ripple emulator (CB-9760) -if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 - module.exports = window.open.bind(window); // fallback to default window.open behaviour - return; -} +(function() { + // special patch to correctly work on Ripple emulator (CB-9760) + if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021 + module.exports = window.open.bind(window); // fallback to default window.open behaviour + return; + } -var exec = require('cordova/exec'); -var channel = require('cordova/channel'); -var modulemapper = require('cordova/modulemapper'); -var urlutil = require('cordova/urlutil'); + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); -function InAppBrowser() { - this.channels = { - 'loadstart': channel.create('loadstart'), - 'loadstop' : channel.create('loadstop'), - 'loaderror' : channel.create('loaderror'), - 'exit' : channel.create('exit') - }; -} + function InAppBrowser() { + this.channels = { + 'loadstart': channel.create('loadstart'), + 'loadstop' : channel.create('loadstop'), + 'loaderror' : channel.create('loaderror'), + 'exit' : channel.create('exit') + }; + } -InAppBrowser.prototype = { - _eventHandler: function (event) { - if (event && (event.type in this.channels)) { - this.channels[event.type].fire(event); - } - }, - close: function (eventname) { - exec(null, null, "InAppBrowser", "close", []); - }, - show: function (eventname) { - exec(null, null, "InAppBrowser", "show", []); - }, - addEventListener: function (eventname,f) { - if (eventname in this.channels) { - this.channels[eventname].subscribe(f); - } - }, - removeEventListener: function(eventname, f) { - if (eventname in this.channels) { - this.channels[eventname].unsubscribe(f); - } - }, + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && (event.type in this.channels)) { + this.channels[event.type].fire(event); + } + }, + close: function (eventname) { + exec(null, null, "InAppBrowser", "close", []); + }, + show: function (eventname) { + exec(null, null, "InAppBrowser", "show", []); + }, + addEventListener: function (eventname,f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function(eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, - executeScript: function(injectDetails, cb) { - if (injectDetails.code) { - exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); - } else if (injectDetails.file) { - exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); - } else { - throw new Error('executeScript requires exactly one of code or file to be specified'); - } - }, + executeScript: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, - insertCSS: function(injectDetails, cb) { - if (injectDetails.code) { - exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); - } else if (injectDetails.file) { - exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); - } else { - throw new Error('insertCSS requires exactly one of code or file to be specified'); + insertCSS: function(injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } } - } -}; - -module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { - // Don't catch calls that write to existing frames (e.g. named iframes). - if (window.frames && window.frames[strWindowName]) { - var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); - return origOpenFunc.apply(window, arguments); - } + }; - strUrl = urlutil.makeAbsolute(strUrl); - var iab = new InAppBrowser(); + module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } - callbacks = callbacks || {}; - for (var callbackName in callbacks) { - iab.addEventListener(callbackName, callbacks[callbackName]); - } + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); - var cb = function(eventname) { - iab._eventHandler(eventname); - }; + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } - strWindowFeatures = strWindowFeatures || ""; + var cb = function(eventname) { + iab._eventHandler(eventname); + }; - exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); - return iab; -}; + strWindowFeatures = strWindowFeatures || ""; + exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); diff --git a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js index 42d15d2c..ed954770 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js +++ b/StoneIsland/plugins/cordova-plugin-inappbrowser/www/windows8/InAppBrowserProxy.js @@ -22,10 +22,6 @@ /*jslint sloppy:true */ /*global Windows:true, require, document, setTimeout, window, module */ - -var cordova = require('cordova'), - channel = require('cordova/channel'); - var browserWrap; var IAB = { @@ -45,7 +41,6 @@ var IAB = { open: function (win, lose, args) { var strUrl = args[0], target = args[1], - features = args[2], url, elem; |
