You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/05/09 08:14:56 UTC

[05/11] git commit: handle confirm args of JSON array, or comma delimited.

handle confirm args of JSON array, or comma delimited.


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

Branch: refs/heads/master
Commit: a3b381b9a4a55d88a77bfa6940e2c11c576cdbe3
Parents: 66273d3
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed May 1 00:11:30 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed May 1 00:11:30 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/a3b381b9/templates/standalone/Plugins/Notification.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/Plugins/Notification.cs b/templates/standalone/Plugins/Notification.cs
index 4bc3942..17825c8 100644
--- a/templates/standalone/Plugins/Notification.cs
+++ b/templates/standalone/Plugins/Notification.cs
@@ -148,7 +148,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();