cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject wp7 commit: CB-3280 start page can now be relative, inside the www folder
Date Fri, 17 May 2013 01:23:03 GMT
Updated Branches:
  refs/heads/master 1881859dc -> 4ab61a7d7


CB-3280 start page can now be relative, inside the www folder


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp7/commit/4ab61a7d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp7/tree/4ab61a7d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp7/diff/4ab61a7d

Branch: refs/heads/master
Commit: 4ab61a7d7b36f96da7298b8bd1f96f55e689f77e
Parents: 1881859
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Thu May 16 18:22:24 2013 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Thu May 16 18:22:24 2013 -0700

----------------------------------------------------------------------
 .../standalone/cordovalib/CordovaView.xaml.cs      |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/4ab61a7d/templates/standalone/cordovalib/CordovaView.xaml.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/CordovaView.xaml.cs b/templates/standalone/cordovalib/CordovaView.xaml.cs
index f6584a8..d57249a 100644
--- a/templates/standalone/cordovalib/CordovaView.xaml.cs
+++ b/templates/standalone/cordovalib/CordovaView.xaml.cs
@@ -152,6 +152,18 @@ namespace WPCordovaClassLib
             configHandler = new ConfigHandler();
             configHandler.LoadAppPackageConfig();
 
+            if (configHandler.ContentSrc != null)
+            {
+                if (Uri.IsWellFormedUriString(configHandler.ContentSrc, UriKind.Absolute))
+                {
+                    this.StartPageUri = new Uri(configHandler.ContentSrc, UriKind.Absolute);
+                }
+                else
+                {
+                    this.StartPageUri = new Uri(AppRoot + "www/" + configHandler.ContentSrc,
UriKind.Relative);
+                }
+            }  
+
             // initializes native execution logic
             nativeExecution = new NativeExecution(ref this.CordovaBrowser);
             bmHelper = new BrowserMouseHelper(ref this.CordovaBrowser);


Mime
View raw message