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 2014/05/16 03:59:44 UTC

[1/3] git commit: CB-6528 allow scroll on alert message content

Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master a8f5e5ff5 -> 5001fa326


CB-6528 allow scroll on alert message content


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/7db30d97
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/7db30d97
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/7db30d97

Branch: refs/heads/master
Commit: 7db30d974c2f62ca52f217dfac3c6f9b9f1a1168
Parents: a8f5e5f
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu May 15 18:43:48 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu May 15 18:43:48 2014 -0700

----------------------------------------------------------------------
 src/wp/Notification.cs      | 26 ++++++++++--------
 src/wp/NotificationBox.xaml | 59 ++++++++++++++++++++++++++--------------
 2 files changed, 52 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/7db30d97/src/wp/Notification.cs
----------------------------------------------------------------------
diff --git a/src/wp/Notification.cs b/src/wp/Notification.cs
index 84ec4de..4d5f407 100644
--- a/src/wp/Notification.cs
+++ b/src/wp/Notification.cs
@@ -168,9 +168,14 @@ namespace WPCordovaClassLib.Cordova.Commands
                         notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId };
                         notifyBox.PageTitle.Text = title;
                         notifyBox.SubTitle.Text = message;
-                        TextBox textBox = new TextBox();
-                        textBox.Text = defaultText;
-                        notifyBox.TitlePanel.Children.Add(textBox);
+
+                        //TextBox textBox = new TextBox();
+                        //textBox.Text = defaultText;
+                        //textBox.AcceptsReturn = true;
+                        //notifyBox.ContentScroller.Content = textBox;
+
+                        notifyBox.InputText.Text = defaultText;
+                        notifyBox.InputText.Visibility = Visibility.Visible;
 
                         for (int i = 0; i < buttonLabels.Length; ++i)
                         {
@@ -178,7 +183,8 @@ namespace WPCordovaClassLib.Cordova.Commands
                             button.Content = buttonLabels[i];
                             button.Tag = i + 1;
                             button.Click += promptBoxbutton_Click;
-                            notifyBox.TitlePanel.Children.Add(button);
+                            notifyBox.ButtonPanel.Orientation = Orientation.Vertical;
+                            notifyBox.ButtonPanel.Children.Add(button);
                         }
 
                         grid.Children.Add(notifyBox);
@@ -265,14 +271,10 @@ namespace WPCordovaClassLib.Cordova.Commands
 
             if (promptBox != null)
             {
-                foreach (UIElement element in (promptBox as NotificationBox).TitlePanel.Children)
-                {
-                    if (element is TextBox)
-                    {
-                        text = (element as TextBox).Text;
-                        break;
-                    }
-                }
+                NotificationBox box = promptBox as NotificationBox;
+
+                text = box.InputText.Text;
+
                 PhoneApplicationPage page = Page;
                 if (page != null)
                 {

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/7db30d97/src/wp/NotificationBox.xaml
----------------------------------------------------------------------
diff --git a/src/wp/NotificationBox.xaml b/src/wp/NotificationBox.xaml
index 1ca5d5f..5bf7aa6 100644
--- a/src/wp/NotificationBox.xaml
+++ b/src/wp/NotificationBox.xaml
@@ -27,36 +27,53 @@
     Foreground="{StaticResource PhoneForegroundBrush}"
     d:DesignHeight="800" d:DesignWidth="480" VerticalAlignment="Stretch">
 
-    <Grid x:Name="LayoutRoot" 
-          Background="{StaticResource PhoneSemitransparentBrush}" VerticalAlignment="Stretch">
-        
+   <!--TitlePanel contains the name of the application and page title-->
+    <Grid x:Name="LayoutRoot"
+          Background="{StaticResource PhoneSemitransparentBrush}">
         <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="*"/>
+            <RowDefinition Height="*"></RowDefinition>
         </Grid.RowDefinitions>
-        
 
-        <!--TitlePanel contains the name of the application and page title-->
-        <StackPanel x:Name="TitlePanel" 
-                    Grid.Row="0" 
-                    Background="{StaticResource PhoneSemitransparentBrush}">
+        <Grid x:Name="TitlePanel" 
+            Grid.Row="0"
+            VerticalAlignment="Top"
+            Background="{StaticResource PhoneSemitransparentBrush}">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"></RowDefinition>
+                <RowDefinition Height="*"></RowDefinition>
+                <RowDefinition Height="Auto"></RowDefinition>
+            </Grid.RowDefinitions>
+
             <TextBlock x:Name="PageTitle" 
                        Text="Title" 
                        Margin="10,10" 
+                       Grid.Row="0"
                        Style="{StaticResource PhoneTextTitle2Style}"/>
             
-            <TextBlock x:Name="SubTitle" 
-                       Text="Subtitle" 
-                       TextWrapping="Wrap"
-                       Margin="10,10"
-                       Style="{StaticResource PhoneTextTitle3Style}"/>
-            
-            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">       
-            <StackPanel x:Name="ButtonPanel"
-                        Margin="10,10"
-                        Orientation="Horizontal"/>
+            <ScrollViewer x:Name="ContentScroller"
+                          Grid.Row="1"
+                          MinHeight="240"
+                          Margin="10,10">
+                <StackPanel Orientation="Vertical">
+                    <TextBlock x:Name="SubTitle" 
+                               Text="Subtitle" 
+                               Width="Auto"
+                               TextWrapping="Wrap"
+                               Style="{StaticResource PhoneTextTitle3Style}"/>
+                    <TextBox x:Name="InputText" 
+                             Visibility="Collapsed"/>
+                </StackPanel>
+            </ScrollViewer>
+
+            <ScrollViewer HorizontalScrollBarVisibility="Auto" 
+                          Grid.Row="2"
+                          VerticalScrollBarVisibility="Disabled">       
+                <StackPanel x:Name="ButtonPanel"
+                            Margin="10,10"
+                            Orientation="Horizontal"/>
             </ScrollViewer>
 
-        </StackPanel>
     </Grid>
+    </Grid>
+
 </UserControl>


[3/3] git commit: CB-4616 Returned index 0 was not documented for notification.prompt

Posted by pu...@apache.org.
CB-4616 Returned index 0 was not documented for notification.prompt


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/5001fa32
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/5001fa32
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/5001fa32

Branch: refs/heads/master
Commit: 5001fa326b4a3631e69acabb61d7eb67ecbb4715
Parents: 5faec77
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu May 15 18:57:27 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu May 15 18:57:27 2014 -0700

----------------------------------------------------------------------
 doc/index.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/5001fa32/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 7d3a3f4..97ebf92 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -153,7 +153,7 @@ Displays a native dialog box that is more customizable than the browser's `promp
 
 - __message__: Dialog message. _(String)_
 
-- __promptCallback__: Callback to invoke when a button is pressed. _(Function)_
+- __promptCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_
 
 - __title__: Dialog title _(String)_ (Optional, defaults to `Prompt`)
 
@@ -169,6 +169,8 @@ contains the following properties:
 
 - __buttonIndex__: The index of the pressed button. _(Number)_ Note that the index uses one-based indexing, so the value is `1`, `2`, `3`, etc.
 
+
+
 - __input1__: The text entered in the prompt dialog box. _(String)_
 
 ### Example


[2/3] git commit: update docs to state that prompt is supported on windowsphone

Posted by pu...@apache.org.
update docs to state that prompt is supported on windowsphone


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/5faec77b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/5faec77b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/5faec77b

Branch: refs/heads/master
Commit: 5faec77ba6fb8c190fcc0ee8ce8a1cd944ac8d06
Parents: 7db30d9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu May 15 18:49:48 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu May 15 18:50:51 2014 -0700

----------------------------------------------------------------------
 doc/index.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/5faec77b/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index e07d21f..7d3a3f4 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -191,6 +191,7 @@ contains the following properties:
 - Android
 - Firefox OS
 - iOS
+- Windows Phone 7 and 8
 
 ### Android Quirks