Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D80DEA33 for ; Tue, 12 Feb 2013 19:33:10 +0000 (UTC) Received: (qmail 62378 invoked by uid 500); 12 Feb 2013 19:33:08 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 62322 invoked by uid 500); 12 Feb 2013 19:33:08 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 61781 invoked by uid 99); 12 Feb 2013 19:33:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 19:33:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8831651685; Tue, 12 Feb 2013 19:33:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [27/50] js commit: [all] modulemapper refactor for InAppBrowser. Message-Id: <20130212193307.8831651685@tyr.zones.apache.org> Date: Tue, 12 Feb 2013 19:33:07 +0000 (UTC) [all] modulemapper refactor for InAppBrowser. https://issues.apache.org/jira/browse/CB-2227 Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/3427c50e Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/3427c50e Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/3427c50e Branch: refs/heads/symbolmapping Commit: 3427c50ea0137786e6149c62efc07b427de2ee17 Parents: 13af0c0 Author: Andrew Grieve Authored: Fri Jan 25 11:12:04 2013 -0500 Committer: Andrew Grieve Committed: Tue Feb 12 13:44:50 2013 -0500 ---------------------------------------------------------------------- lib/android/platform.js | 3 -- lib/android/plugin/inappbrowser/symbols.js | 24 +++++++++++++++ lib/blackberry/plugin/qnx/InAppBrowser.js | 7 ++-- .../plugin/qnx/inappbrowser/bbsymbols.js | 24 +++++++++++++++ lib/blackberry/plugin/qnx/platform.js | 5 --- lib/common/common.js | 3 -- lib/common/plugin/InAppBrowser.js | 2 - lib/ios/platform.js | 3 -- lib/ios/plugin/inappbrowser/symbols.js | 24 +++++++++++++++ 9 files changed, 76 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/android/platform.js ---------------------------------------------------------------------- diff --git a/lib/android/platform.js b/lib/android/platform.js index 0231229..263ee20 100644 --- a/lib/android/platform.js +++ b/lib/android/platform.js @@ -108,9 +108,6 @@ module.exports = { }, MediaError: { // exists natively on Android WebView on Android 4.x path: "cordova/plugin/MediaError" - }, - open: { - path: "cordova/plugin/InAppBrowser" } }, merges: { http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/android/plugin/inappbrowser/symbols.js ---------------------------------------------------------------------- diff --git a/lib/android/plugin/inappbrowser/symbols.js b/lib/android/plugin/inappbrowser/symbols.js new file mode 100644 index 0000000..1b0866e --- /dev/null +++ b/lib/android/plugin/inappbrowser/symbols.js @@ -0,0 +1,24 @@ +/* + * 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. + * +*/ + + +var modulemapper = require('cordova/modulemapper'); + +modulemapper.clobbers('cordova/plugin/InAppBrowser', 'open'); http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/blackberry/plugin/qnx/InAppBrowser.js ---------------------------------------------------------------------- diff --git a/lib/blackberry/plugin/qnx/InAppBrowser.js b/lib/blackberry/plugin/qnx/InAppBrowser.js index f6d4b24..e42a293 100644 --- a/lib/blackberry/plugin/qnx/InAppBrowser.js +++ b/lib/blackberry/plugin/qnx/InAppBrowser.js @@ -20,14 +20,15 @@ */ var cordova = require('cordova'), - core = require('cordova/plugin/InAppBrowser'), + modulemapper = require('cordova/modulemapper'), + origOpen = modulemapper.getOriginalSymbol(window, 'open'), browser = { close: function () { } //dummy so we don't have to check for undefined }; var navigate = { "_blank": function (url, whitelisted) { - return core._orig.apply(null, [url, "_blank"]); + return origOpen(url, "_blank"); }, "_self": function (url, whitelisted) { @@ -36,7 +37,7 @@ var navigate = { return window; } else { - return core._orig.apply(null, [url, "_blank"]); + return origOpen(url, "_blank"); } }, http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/blackberry/plugin/qnx/inappbrowser/bbsymbols.js ---------------------------------------------------------------------- diff --git a/lib/blackberry/plugin/qnx/inappbrowser/bbsymbols.js b/lib/blackberry/plugin/qnx/inappbrowser/bbsymbols.js new file mode 100644 index 0000000..1b0866e --- /dev/null +++ b/lib/blackberry/plugin/qnx/inappbrowser/bbsymbols.js @@ -0,0 +1,24 @@ +/* + * 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. + * +*/ + + +var modulemapper = require('cordova/modulemapper'); + +modulemapper.clobbers('cordova/plugin/InAppBrowser', 'open'); http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/blackberry/plugin/qnx/platform.js ---------------------------------------------------------------------- diff --git a/lib/blackberry/plugin/qnx/platform.js b/lib/blackberry/plugin/qnx/platform.js index 40d309f..a6daa03 100644 --- a/lib/blackberry/plugin/qnx/platform.js +++ b/lib/blackberry/plugin/qnx/platform.js @@ -40,10 +40,5 @@ module.exports = { cordova.fireDocumentEvent("offline"); }); }); - }, - clobbers: { - open: { - path: "cordova/plugin/InAppBrowser" - } } }; http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/common/common.js ---------------------------------------------------------------------- diff --git a/lib/common/common.js b/lib/common/common.js index d5557e9..7dfe9af 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -39,9 +39,6 @@ module.exports = { } } }, - open : { - path: 'cordova/plugin/InAppBrowser' - }, navigator: { children: { notification: { http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/common/plugin/InAppBrowser.js ---------------------------------------------------------------------- diff --git a/lib/common/plugin/InAppBrowser.js b/lib/common/plugin/InAppBrowser.js index 9b8bee1..400ee56 100644 --- a/lib/common/plugin/InAppBrowser.js +++ b/lib/common/plugin/InAppBrowser.js @@ -60,5 +60,3 @@ module.exports = function(strUrl, strWindowName, strWindowFeatures) { return iab; }; -//Export the original open so it can be used if needed -module.exports._orig = window.open; http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/ios/platform.js ---------------------------------------------------------------------- diff --git a/lib/ios/platform.js b/lib/ios/platform.js index ce7e5e0..eaa7cc0 100644 --- a/lib/ios/platform.js +++ b/lib/ios/platform.js @@ -33,9 +33,6 @@ module.exports = { }, console: { path: 'cordova/plugin/ios/console' - }, - open : { - path: 'cordova/plugin/InAppBrowser' } }, merges:{ http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3427c50e/lib/ios/plugin/inappbrowser/symbols.js ---------------------------------------------------------------------- diff --git a/lib/ios/plugin/inappbrowser/symbols.js b/lib/ios/plugin/inappbrowser/symbols.js new file mode 100644 index 0000000..1b0866e --- /dev/null +++ b/lib/ios/plugin/inappbrowser/symbols.js @@ -0,0 +1,24 @@ +/* + * 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. + * +*/ + + +var modulemapper = require('cordova/modulemapper'); + +modulemapper.clobbers('cordova/plugin/InAppBrowser', 'open');