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 7F9FFE327 for ; Tue, 20 Nov 2012 23:34:21 +0000 (UTC) Received: (qmail 30259 invoked by uid 500); 20 Nov 2012 23:34:21 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 30215 invoked by uid 500); 20 Nov 2012 23:34:21 -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 30207 invoked by uid 500); 20 Nov 2012 23:34:21 -0000 Delivered-To: apmail-incubator-callback-commits@incubator.apache.org Received: (qmail 30203 invoked by uid 99); 20 Nov 2012 23:34:21 -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, 20 Nov 2012 23:34:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D454831857E; Tue, 20 Nov 2012 23:34:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: js commit: Added InAppBrowser common plugin (window.open) Message-Id: <20121120233420.D454831857E@tyr.zones.apache.org> Date: Tue, 20 Nov 2012 23:34:20 +0000 (UTC) Updated Branches: refs/heads/master 9204c357b -> 3e61b37c6 Added InAppBrowser common plugin (window.open) Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/3e61b37c Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/3e61b37c Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/3e61b37c Branch: refs/heads/master Commit: 3e61b37c6364aae1a5a45b184e13810cc88d5350 Parents: 9204c35 Author: Shazron Abdullah Authored: Tue Nov 20 14:52:12 2012 -0800 Committer: Shazron Abdullah Committed: Tue Nov 20 15:34:08 2012 -0800 ---------------------------------------------------------------------- lib/common/common.js | 3 ++ lib/common/plugin/InAppBrowser.js | 34 ++++++++++++++++++++++++++++++++ lib/ios/platform.js | 3 ++ 3 files changed, 40 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/common/common.js ---------------------------------------------------------------------- diff --git a/lib/common/common.js b/lib/common/common.js index 2b3ec40..2dbe248 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -39,6 +39,9 @@ module.exports = { } } }, + open : { + path: 'cordova/plugin/InAppBrowser' + }, navigator: { children: { notification: { http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/common/plugin/InAppBrowser.js ---------------------------------------------------------------------- diff --git a/lib/common/plugin/InAppBrowser.js b/lib/common/plugin/InAppBrowser.js new file mode 100644 index 0000000..dee450f --- /dev/null +++ b/lib/common/plugin/InAppBrowser.js @@ -0,0 +1,34 @@ +/* + * + * 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 exec = require('cordova/exec'); + +var InAppBrowser = { + open : function(strUrl, strWindowName, strWindowFeatures) { + exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return InAppBrowser; + }, + close : function() { + exec(null, null, "InAppBrowser", "close", []); + } +}; + +module.exports = InAppBrowser.open; http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/ios/platform.js ---------------------------------------------------------------------- diff --git a/lib/ios/platform.js b/lib/ios/platform.js index c196a92..9a0f3c0 100644 --- a/lib/ios/platform.js +++ b/lib/ios/platform.js @@ -42,6 +42,9 @@ module.exports = { }, console: { path: 'cordova/plugin/ios/console' + }, + open : { + path: 'cordova/plugin/InAppBrowser' } }, merges:{