cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject [1/3] cordova-plugin-dialogs git commit: CB-7639 Update docs + manual tests
Date Thu, 13 Nov 2014 06:52:58 GMT
Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master 06a1dea0a -> 305020a52


CB-7639 Update docs + manual tests


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/305020a5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/305020a5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/305020a5

Branch: refs/heads/master
Commit: 305020a5279caf1a780890cdbd4c8762d35c716e
Parents: cd9c3bb
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Thu Sep 25 17:21:54 2014 +0400
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Wed Nov 12 22:50:35 2014 -0800

----------------------------------------------------------------------
 doc/index.md   |  8 ++++++++
 tests/tests.js | 15 ++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/305020a5/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 442849c..758dbbf 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -80,6 +80,7 @@ function, which is typically less customizable.
 - Tizen
 - Windows Phone 7 and 8
 - Windows 8
+- Windows
 
 ### Windows Phone 7 and 8 Quirks
 
@@ -143,6 +144,7 @@ indexing, so the value is `1`, `2`, `3`, etc.
 - Tizen
 - Windows Phone 7 and 8
 - Windows 8
+- Windows
 
 ### Windows Phone 7 and 8 Quirks
 
@@ -152,6 +154,12 @@ indexing, so the value is `1`, `2`, `3`, etc.
 
 - Calls to `alert` and `confirm` are non-blocking, so the result is only available asynchronously.
 
+### Windows Quirks
+
+- On Windows8/8.1 it is not possible to add more than three buttons to MessageDialog instance.
+
+- On Windows Phone 8.1 it's not possible to show dialog with more than two buttons.
+
 ### Firefox OS Quirks:
 
 Both native-blocking `window.confirm()` and non-blocking `navigator.notification.confirm()`
are available.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/305020a5/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 6e61b00..eedf82d 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -163,12 +163,17 @@ exports.defineManualTests = function (contentEl, createActionButton)
{
         alertDialog('You pressed alert.', 'Alert Dialog', 'Continue');
     }, 'alert');
 
+    // WP8.1 detection is necessary since it doesn't support confirm dialogs with more than
2 buttons
+    var isRunningOnWP81 = cordova.platformId == "windows" && navigator.userAgent.indexOf('Windows
Phone') > -1;
+
     createActionButton('Confirm Dialog - Deprecated', function () {
-        confirmDialogA('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe');
+        var buttons = isRunningOnWP81 ? 'Yes,No' : 'Yes,No,Maybe';
+        confirmDialogA('You pressed confirm.', 'Confirm Dialog', buttons);
     }, 'confirm_deprecated');
 
     createActionButton('Confirm Dialog', function () {
-        confirmDialogB('You pressed confirm.', 'Confirm Dialog', ['Yes', 'No', 'Maybe, Not
Sure']);
+        var buttons = isRunningOnWP81 ? ['Yes', 'Actually, No'] : ['Yes', 'No', 'Maybe, Not
Sure'];
+        confirmDialogB('You pressed confirm.', 'Confirm Dialog', buttons);
     }, 'confirm');
 
     createActionButton('Prompt Dialog', function () {
@@ -176,14 +181,14 @@ exports.defineManualTests = function (contentEl, createActionButton)
{
     }, 'prompt');
 
     createActionButton('Built-in Alert Dialog', function () {
-        alert('You pressed alert');
+        typeof alert === 'function' && alert('You pressed alert');
     }, 'built_in_alert');
 
     createActionButton('Built-in Confirm Dialog', function () {
-        confirm('You selected confirm');
+        typeof confirm === 'function' && confirm('You selected confirm');
     }, 'built_in_confirm');
 
     createActionButton('Built-in Prompt Dialog', function () {
-        prompt('This is a prompt', 'Default value');
+        typeof prompt === 'function' && prompt('This is a prompt', 'Default value');
     }, 'built_in_prompt');
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message