cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject wp7 commit: CB2444 - events not fired
Date Fri, 15 Feb 2013 01:48:50 GMT
Updated Branches:
  refs/heads/master bdc52435b -> b3c7b81bc


CB2444 - events not fired


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

Branch: refs/heads/master
Commit: b3c7b81bc16869baa4c99ccdf914fffb1470df5c
Parents: bdc5243
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Thu Feb 14 17:48:05 2013 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Thu Feb 14 17:48:05 2013 -0800

----------------------------------------------------------------------
 .../standalone/cordovalib/Commands/InAppBrowser.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/b3c7b81b/templates/standalone/cordovalib/Commands/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/InAppBrowser.cs b/templates/standalone/cordovalib/Commands/InAppBrowser.cs
index 7408421..91e44bd 100644
--- a/templates/standalone/cordovalib/Commands/InAppBrowser.cs
+++ b/templates/standalone/cordovalib/Commands/InAppBrowser.cs
@@ -229,6 +229,10 @@ namespace WPCordovaClassLib.Cordova.Commands
                         }
                     }
                     browser = null;
+                    string message = "{\"type\":\"exit\"}";
+                    PluginResult result = new PluginResult(PluginResult.Status.OK, message);
+                    result.KeepCallback = false;
+                    this.DispatchCommandResult(result);
                 });
             }
         }
@@ -240,7 +244,7 @@ namespace WPCordovaClassLib.Cordova.Commands
             //    backButton.IsEnabled = browser.CanGoBack;
             //    fwdButton.IsEnabled = browser.CanGoForward;
             //}
-            string message = "{\"type\":\"locationChanged\", \"location\":\"" + e.Uri.AbsoluteUri
+ "\"}";
+            string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -248,7 +252,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs
e)
         {
-            string message = "{\"type\":\"navigationError\",\"location\":\"" + e.Uri.AbsoluteUri
+ "\"}";
+            string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.ERROR, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -256,7 +260,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_Navigating(object sender, NavigatingEventArgs e)
         {
-            string message = "{\"type\":\"locationAboutToChange\",\"location\":\"" + e.Uri.AbsoluteUri
+ "\"}";
+            string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);


Mime
View raw message