cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: CB-2541 notification.confirm native side buttonLabels takes string[] or s, t, r, i, n, g
Date Wed, 17 Apr 2013 01:18:10 GMT
Updated Branches:
  refs/heads/master a04e8bf9e -> 2cef461d1


CB-2541 notification.confirm native side buttonLabels takes string[] or s,t,r,i,n,g


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

Branch: refs/heads/master
Commit: 2cef461d1cee791eb8667247b14b56193f7b4035
Parents: a04e8bf
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Apr 16 18:17:27 2013 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Apr 16 18:17:27 2013 -0700

----------------------------------------------------------------------
 templates/standalone/Plugins/Notification.cs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/2cef461d/templates/standalone/Plugins/Notification.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/Plugins/Notification.cs b/templates/standalone/Plugins/Notification.cs
index 4089e3e..912df2b 100644
--- a/templates/standalone/Plugins/Notification.cs
+++ b/templates/standalone/Plugins/Notification.cs
@@ -143,7 +143,13 @@ namespace WPCordovaClassLib.Cordova.Commands
                         notifyBox.PageTitle.Text = alertOpts.title;
                         notifyBox.SubTitle.Text = alertOpts.message;
 
-                        string[] labels = alertOpts.buttonLabel.Split(',');
+                        string[] labels = JSON.JsonHelper.Deserialize<string[]>(alertOpts.buttonLabel);
+
+                        if (labels == null)
+                        {
+                            labels = alertOpts.buttonLabel.Split(',');
+                        }
+
                         for (int n = 0; n < labels.Length; n++)
                         {
                             Button btn = new Button();


Mime
View raw message