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 13995F707 for ; Wed, 3 Apr 2013 19:07:34 +0000 (UTC) Received: (qmail 94999 invoked by uid 500); 3 Apr 2013 19:07:33 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 94959 invoked by uid 500); 3 Apr 2013 19:07:33 -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 94413 invoked by uid 99); 3 Apr 2013 19:07:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Apr 2013 19:07:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7608A837035; Wed, 3 Apr 2013 19:07:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: purplecabbage@apache.org To: commits@cordova.apache.org Date: Wed, 03 Apr 2013 19:07:46 -0000 Message-Id: <9c01f36182d742e8ba0a9b4a6d77d362@git.apache.org> In-Reply-To: <8ceaaedea2c64b0882703cfffba2a793@git.apache.org> References: <8ceaaedea2c64b0882703cfffba2a793@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/16] git commit: issues with InAppBrowser fixed in template issues with InAppBrowser fixed in template Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/d8f1d209 Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/d8f1d209 Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/d8f1d209 Branch: refs/heads/master Commit: d8f1d2091eb1473db18a2b97e16532a463db8ca5 Parents: 2922d08 Author: Jesse MacFadyen Authored: Wed Apr 3 10:02:38 2013 -0700 Committer: Jesse MacFadyen Committed: Wed Apr 3 10:02:38 2013 -0700 ---------------------------------------------------------------------- templates/standalone/CordovaAppProj.csproj | 7 +++ templates/standalone/Images/appbar.back.rest.png | Bin 0 -> 375 bytes templates/standalone/Images/appbar.close.rest.png | Bin 0 -> 359 bytes .../Images/appbar.feature.video.rest.png | Bin 0 -> 433 bytes templates/standalone/Images/appbar.next.rest.png | Bin 0 -> 388 bytes templates/standalone/Images/appbar.save.rest.png | Bin 0 -> 297 bytes templates/standalone/Images/appbar.stop.rest.png | Bin 0 -> 350 bytes templates/standalone/MainPage.xaml | 3 +- templates/standalone/MainPage.xaml.cs | 8 ++-- .../standalone/cordovalib/Commands/InAppBrowser.cs | 37 ++++++++------- templates/vs/description.txt | 4 +- 11 files changed, 35 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/CordovaAppProj.csproj ---------------------------------------------------------------------- diff --git a/templates/standalone/CordovaAppProj.csproj b/templates/standalone/CordovaAppProj.csproj index 56bce52..359fb2a 100644 --- a/templates/standalone/CordovaAppProj.csproj +++ b/templates/standalone/CordovaAppProj.csproj @@ -139,6 +139,7 @@ + @@ -207,6 +208,12 @@ + + + + + + http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.back.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.back.rest.png b/templates/standalone/Images/appbar.back.rest.png new file mode 100644 index 0000000..4bc2b92 Binary files /dev/null and b/templates/standalone/Images/appbar.back.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.close.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.close.rest.png b/templates/standalone/Images/appbar.close.rest.png new file mode 100644 index 0000000..8166a1c Binary files /dev/null and b/templates/standalone/Images/appbar.close.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.feature.video.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.feature.video.rest.png b/templates/standalone/Images/appbar.feature.video.rest.png new file mode 100644 index 0000000..baff565 Binary files /dev/null and b/templates/standalone/Images/appbar.feature.video.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.next.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.next.rest.png b/templates/standalone/Images/appbar.next.rest.png new file mode 100644 index 0000000..ed577d7 Binary files /dev/null and b/templates/standalone/Images/appbar.next.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.save.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.save.rest.png b/templates/standalone/Images/appbar.save.rest.png new file mode 100644 index 0000000..d49940e Binary files /dev/null and b/templates/standalone/Images/appbar.save.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/Images/appbar.stop.rest.png ---------------------------------------------------------------------- diff --git a/templates/standalone/Images/appbar.stop.rest.png b/templates/standalone/Images/appbar.stop.rest.png new file mode 100644 index 0000000..4dd724f Binary files /dev/null and b/templates/standalone/Images/appbar.stop.rest.png differ http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/MainPage.xaml ---------------------------------------------------------------------- diff --git a/templates/standalone/MainPage.xaml b/templates/standalone/MainPage.xaml index 079a863..db0d8e6 100644 --- a/templates/standalone/MainPage.xaml +++ b/templates/standalone/MainPage.xaml @@ -37,7 +37,7 @@ + http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/MainPage.xaml.cs ---------------------------------------------------------------------- diff --git a/templates/standalone/MainPage.xaml.cs b/templates/standalone/MainPage.xaml.cs index 88fa5ea..b9ec7e1 100644 --- a/templates/standalone/MainPage.xaml.cs +++ b/templates/standalone/MainPage.xaml.cs @@ -32,7 +32,6 @@ using Microsoft.Phone.Controls; using System.IO; using System.Windows.Media.Imaging; using System.Windows.Resources; -using WPCordovaClassLib; namespace $safeprojectname$ @@ -43,12 +42,13 @@ namespace $safeprojectname$ public MainPage() { InitializeComponent(); - this.PGView.Loaded += GapBrowser_Loaded; + this.CordovaView.Loaded += CordovaView_Loaded; } - private void GapBrowser_Loaded(object sender, RoutedEventArgs e) + private void CordovaView_Loaded(object sender, RoutedEventArgs e) { - this.PGView.Loaded -= GapBrowser_Loaded; + this.CordovaView.Loaded -= CordovaView_Loaded; + // first time load will have an animation Storyboard _storyBoard = new Storyboard(); DoubleAnimation animation = new DoubleAnimation() { http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/standalone/cordovalib/Commands/InAppBrowser.cs ---------------------------------------------------------------------- diff --git a/templates/standalone/cordovalib/Commands/InAppBrowser.cs b/templates/standalone/cordovalib/Commands/InAppBrowser.cs index c91b1ab..ed4c6e1 100644 --- a/templates/standalone/cordovalib/Commands/InAppBrowser.cs +++ b/templates/standalone/cordovalib/Commands/InAppBrowser.cs @@ -42,20 +42,20 @@ namespace WPCordovaClassLib.Cordova.Commands //BrowserOptions opts = JSON.JsonHelper.Deserialize(options); string urlLoc = args[0]; string target = args[1]; -/* - _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser - _blank - always open in the InAppBrowser - _system - always open in the system web browser -*/ - switch (target) + /* + _self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser + _blank - always open in the InAppBrowser + _system - always open in the system web browser + */ + switch (target) { - case "_blank" : + case "_blank": ShowInAppBrowser(urlLoc); break; - case "_self" : + case "_self": ShowCordovaBrowser(urlLoc); break; - case "_system" : + case "_system": ShowSystemBrowser(urlLoc); break; } @@ -65,7 +65,7 @@ namespace WPCordovaClassLib.Cordova.Commands private void ShowCordovaBrowser(string url) { - Uri loc = new Uri(url,UriKind.RelativeOrAbsolute); + Uri loc = new Uri(url, UriKind.RelativeOrAbsolute); Deployment.Current.Dispatcher.BeginInvoke(() => { PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; @@ -75,7 +75,7 @@ namespace WPCordovaClassLib.Cordova.Commands if (page != null) { CordovaView cView = page.FindName("CordovaView") as CordovaView; - if(cView != null) + if (cView != null) { WebBrowser br = cView.Browser; br.Navigate(loc); @@ -113,6 +113,8 @@ namespace WPCordovaClassLib.Cordova.Commands PhoneApplicationPage page = frame.Content as PhoneApplicationPage; WebBrowser br = (page.FindName("CordovaView") as CordovaView).Browser; + string baseImageUrl = "Images/"; + if (page != null) { Grid grid = page.FindName("LayoutRoot") as Grid; @@ -137,7 +139,8 @@ namespace WPCordovaClassLib.Cordova.Commands backButton = new ApplicationBarIconButton(); backButton.Text = "Back"; - backButton.IconUri = new Uri("/Images/appbar.back.rest.png", UriKind.Relative); + + backButton.IconUri = new Uri(baseImageUrl + "appbar.back.rest.png", UriKind.Relative); backButton.Click += new EventHandler(backButton_Click); backButton.IsEnabled = false; bar.Buttons.Add(backButton); @@ -145,14 +148,14 @@ namespace WPCordovaClassLib.Cordova.Commands fwdButton = new ApplicationBarIconButton(); fwdButton.Text = "Forward"; - fwdButton.IconUri = new Uri("/Images/appbar.next.rest.png", UriKind.Relative); + fwdButton.IconUri = new Uri(baseImageUrl + "appbar.next.rest.png", UriKind.Relative); fwdButton.Click += new EventHandler(fwdButton_Click); fwdButton.IsEnabled = false; bar.Buttons.Add(fwdButton); ApplicationBarIconButton closeBtn = new ApplicationBarIconButton(); closeBtn.Text = "Close"; - closeBtn.IconUri = new Uri("/Images/appbar.close.rest.png", UriKind.Relative); + closeBtn.IconUri = new Uri(baseImageUrl + "appbar.close.rest.png", UriKind.Relative); closeBtn.Click += new EventHandler(closeBtn_Click); bar.Buttons.Add(closeBtn); @@ -166,7 +169,7 @@ namespace WPCordovaClassLib.Cordova.Commands void browser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { - + } void fwdButton_Click(object sender, EventArgs e) @@ -178,7 +181,7 @@ namespace WPCordovaClassLib.Cordova.Commands browser.GoForward(); //browser.InvokeScript("execScript", "history.forward();"); } - catch(Exception) + catch (Exception) { } @@ -207,7 +210,7 @@ namespace WPCordovaClassLib.Cordova.Commands } - public void close(string options="") + public void close(string options = "") { if (browser != null) { http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/d8f1d209/templates/vs/description.txt ---------------------------------------------------------------------- diff --git a/templates/vs/description.txt b/templates/vs/description.txt index 579f247..51cdf19 100644 --- a/templates/vs/description.txt +++ b/templates/vs/description.txt @@ -1,7 +1,7 @@ -CordovaWP8AppFull +CordovaWP8_2_6_0_Full Apache Cordova 2.6.0 Windows Phone 8 App using a pre-built dll. -CordovaWP8AppStandalone +CordovaWP8_2_6_0_StandAlone Apache Cordova 2.6.0 Windows Phone 8 App including all framework source code.