cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwbro...@apache.org
Subject [33/46] docs commit: notifications
Date Wed, 12 Jun 2013 17:51:08 GMT
notifications


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

Branch: refs/heads/master
Commit: 03ce2cadfa516a227f733e0e0c1ed9c37a1cd042
Parents: 6e77968
Author: Mike Sierra <letmespellitoutforyou@gmail.com>
Authored: Sun May 19 14:31:12 2013 -0400
Committer: Mike Sierra <letmespellitoutforyou@gmail.com>
Committed: Sun May 19 14:31:12 2013 -0400

----------------------------------------------------------------------
 .../notification/notification.confirm.md        | 65 +++++++++++---------
 .../edge/cordova/notification/notification.md   |  2 +-
 .../cordova/notification/notification.prompt.md | 29 ++++-----
 .../notification/notification.vibrate.md        | 16 ++---
 4 files changed, 59 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/03ce2cad/docs/en/edge/cordova/notification/notification.confirm.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/notification/notification.confirm.md b/docs/en/edge/cordova/notification/notification.confirm.md
index b7c8c16..4b87585 100755
--- a/docs/en/edge/cordova/notification/notification.confirm.md
+++ b/docs/en/edge/cordova/notification/notification.confirm.md
@@ -1,4 +1,4 @@
---- 
+---
 license: Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements.  See the NOTICE file
          distributed with this work for additional information
@@ -20,27 +20,30 @@ license: Licensed to the Apache Software Foundation (ASF) under one
 notification.confirm
 ====================
 
-Shows a customizable confirmation dialog box.
+Displays a customizable confirmation dialog box.
 
     navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
 
-- __message__: Dialog message _(String)_
-- __confirmCallback__: 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, Default: "Confirm")
-- __buttonLabels__: Comma separated string with button labels _(String)_ (Optional, Default:
"OK,Cancel")
+- __message__: Dialog message. _(String)_
+- __confirmCallback__: 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 `Confirm`)
+- __buttonLabels__: Comma-separated string specifying button labels. _(String)_ (Optional,
defaults to `OK,Cancel`)
     
 Description
 -----------
 
-Function `notification.confirm` displays a native dialog box that is more customizable than
the browser's `confirm` function.
+The `notification.confirm` method displays a native dialog box that is
+more customizable than the browser's `confirm` function.
 
 confirmCallback
 ---------------
 
 The `confirmCallback` executes when the user presses one of the
-buttons on the confirmation dialog box.
+buttons in the confirmation dialog box.
 
-The callback takes the argument `buttonIndex` _(Number)_, which is the index of the pressed
button. It's important to note that the index uses one-based indexing, so the value will be
`1`, `2`, `3`, etc.
+The callback takes the argument `buttonIndex` _(Number)_, which is the
+index of the pressed button. Note that the index uses one-based
+indexing, so the value is `1`, `2`, `3`, etc.
 
 Supported Platforms
 -------------------
@@ -56,19 +59,19 @@ Supported Platforms
 Quick Example
 -------------
 
-	// process the confirmation dialog result
-	function onConfirm(buttonIndex) {
-		alert('You selected button ' + buttonIndex);
-	}
+    // process the confirmation dialog result
+    function onConfirm(buttonIndex) {
+        alert('You selected button ' + buttonIndex);
+    }
 
     // Show a custom confirmation dialog
     //
     function showConfirm() {
         navigator.notification.confirm(
-	        'You are the winner!',  // message
-			onConfirm,				// callback to invoke with index of button pressed
-	        'Game Over',            // title
-	        'Restart,Exit'          // buttonLabels
+            'You are the winner!', // message
+             onConfirm,            // callback to invoke with index of button pressed
+            'Game Over',           // title
+            'Restart,Exit'         // buttonLabels
         );
     }
         
@@ -93,19 +96,19 @@ Full Example
             // Empty
         }
     
-		// process the confirmation dialog result
-		function onConfirm(buttonIndex) {
-			alert('You selected button ' + buttonIndex);
-		}
+        // process the confirmation dialog result
+        function onConfirm(buttonIndex) {
+            alert('You selected button ' + buttonIndex);
+        }
 
         // Show a custom confirmation dialog
         //
         function showConfirm() {
             navigator.notification.confirm(
-		        'You are the winner!',  // message
-				onConfirm,				// callback to invoke with index of button pressed
-		        'Game Over',            // title
-		        'Restart,Exit'          // buttonLabels
+                'You are the winner!', // message
+                 onConfirm,            // callback to invoke with index of button pressed
+                'Game Over',           // title
+                'Restart,Exit'         // buttonLabels
             );
         }
     
@@ -119,16 +122,18 @@ Full Example
 Windows Phone 7 and 8 Quirks
 ----------------------
 
-- There is no built-in browser function for `window.confirm`
-    - You can bind `window.confirm` by assigning `window.confirm = navigator.notification.confirm;`.
-- Calls to `alert` and `confirm` are non-blocking and result is only available asynchronously.
+- There is no built-in browser function for `window.confirm`, but you can bind it by assigning:
+
+        window.confirm = navigator.notification.confirm;
+
+- Calls to `alert` and `confirm` are non-blocking, so the result is only available asynchronously.
 
 Bada 2.x Quirks
 ---------------
 
-- `confirm` uses the browser's built-in `alert` function.
+- Calls to `confirm` uses the browser's built-in `alert` function.
 
 Bada 1.2 Quirks
 ---------------
 
-- Ignore button names, always `'OK|Cancel'`.
+- Ignores button names, so always evaluates as `'OK|Cancel'`.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/03ce2cad/docs/en/edge/cordova/notification/notification.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/notification/notification.md b/docs/en/edge/cordova/notification/notification.md
index e18b13b..52ac21f 100644
--- a/docs/en/edge/cordova/notification/notification.md
+++ b/docs/en/edge/cordova/notification/notification.md
@@ -1,4 +1,4 @@
---- 
+---
 license: Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements.  See the NOTICE file
          distributed with this work for additional information

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/03ce2cad/docs/en/edge/cordova/notification/notification.prompt.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/notification/notification.prompt.md b/docs/en/edge/cordova/notification/notification.prompt.md
index 631c80d..6940458 100644
--- a/docs/en/edge/cordova/notification/notification.prompt.md
+++ b/docs/en/edge/cordova/notification/notification.prompt.md
@@ -1,4 +1,4 @@
---- 
+---
 license: Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements.  See the NOTICE file
          distributed with this work for additional information
@@ -24,25 +24,26 @@ Shows a customizable prompt dialog box.
 
     navigator.notification.prompt(message, promptCallback, [title], [buttonLabels])
 
-- __message__: Dialog message _(String)_
-- __promptCallback__: Callback to invoke when a button is pressed _(Function)_
-- __title__: Dialog title _(String)_ (Optional, Default: "Prompt")
-- __buttonLabels__: Array of strings for the button labels _(Array)_ (Optional, Default:
["OK","Cancel"])
+- __message__: Dialog message. _(String)_
+- __promptCallback__: Callback to invoke when a button is pressed. _(Function)_
+- __title__: Dialog title _(String)_ (Optional, defaults to `Prompt`)
+- __buttonLabels__: Array of strings specifying button labels _(Array)_ (Optional, defaults
to `["OK","Cancel"]`)
 
 Description
 -----------
 
-Function `notification.prompt` displays a native dialog box that is more customizable than
the browser's `prompt` function.
+The `notification.prompt` method displays a native dialog box that is
+more customizable than the browser's `prompt` function.
 
 promptCallback
 ---------------
 
-The `promptCallback` executes when the user has pressed one of the buttons on the prompt
dialog box.
-
-The callback takes the argument `results` which contains the following properties:
+The `promptCallback` executes when the user presses one of the buttons
+in the prompt dialog box. The `results` object passed to the callback
+contains the following properties:
 
-- __buttonIndex__: _(Number)_, which is the index of the pressed button. It's important to
note that the index uses one-based indexing, so the value will be `1`, `2`, `3`, etc.
-- __input1__: _(String)_, which is the text entered in the prompt dialog box.
+- __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)_
 
 Supported Platforms
 -------------------
@@ -63,7 +64,7 @@ Quick Example
     function showPrompt() {
         navigator.notification.prompt(
             'Please enter your name',  // message
-            onPrompt,	               // callback to invoke
+            onPrompt,                  // callback to invoke
             'Registration',            // title
             ['Ok','Exit']              // buttonLabels
         );
@@ -116,5 +117,5 @@ Full Example
 Android Quirks
 ----------------------
 
-- Android supports up to a maximum of 3 buttons.  Additional button labels over 3 are ignored.
-- On Android 3.0 and later, the buttons will be displayed in reverse order for devices using
the Holo theme.
+- Android supports a maximum of three buttons, and ignores any more than that.
+- On Android 3.0 and later, buttons are displayed in reverse order for devices that use the
Holo theme.

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/03ce2cad/docs/en/edge/cordova/notification/notification.vibrate.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/notification/notification.vibrate.md b/docs/en/edge/cordova/notification/notification.vibrate.md
index fcc92f2..779436a 100644
--- a/docs/en/edge/cordova/notification/notification.vibrate.md
+++ b/docs/en/edge/cordova/notification/notification.vibrate.md
@@ -1,4 +1,4 @@
---- 
+---
 license: Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements.  See the NOTICE file
          distributed with this work for additional information
@@ -24,7 +24,7 @@ Vibrates the device for the specified amount of time.
 
     navigator.notification.vibrate(milliseconds)
 
-- __time__: Milliseconds to vibrate the device. 1000 milliseconds equals 1 second _(Number)_
+- __time__: Milliseconds to vibrate the device, where 1000 milliseconds equals 1 second.
_(Number)_
 
 Supported Platforms
 -------------------
@@ -66,11 +66,11 @@ Full Example
         // Show a custom alert
         //
         function showAlert() {
-		    navigator.notification.alert(
-		        'You are the winner!',  // message
-		        'Game Over',            // title
-		        'Done'                  // buttonName
-		    );
+            navigator.notification.alert(
+                'You are the winner!',  // message
+                'Game Over',            // title
+                'Done'                  // buttonName
+            );
         }
     
         // Beep three times
@@ -97,7 +97,7 @@ Full Example
 iPhone Quirks
 -------------
 
-- __time__: Ignores the time and vibrates for a pre-set amount of time.
+- __time__: Ignores the specified time and vibrates for a pre-set amount of time.
 
         navigator.notification.vibrate();
         navigator.notification.vibrate(2500);   // 2500 is ignored


Mime
View raw message