1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200 1.3 @@ -0,0 +1,247 @@ 1.4 +<!--- 1.5 + Licensed to the Apache Software Foundation (ASF) under one 1.6 + or more contributor license agreements. See the NOTICE file 1.7 + distributed with this work for additional information 1.8 + regarding copyright ownership. The ASF licenses this file 1.9 + to you under the Apache License, Version 2.0 (the 1.10 + "License"); you may not use this file except in compliance 1.11 + with the License. You may obtain a copy of the License at 1.12 + 1.13 + http://www.apache.org/licenses/LICENSE-2.0 1.14 + 1.15 + Unless required by applicable law or agreed to in writing, 1.16 + software distributed under the License is distributed on an 1.17 + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1.18 + KIND, either express or implied. See the License for the 1.19 + specific language governing permissions and limitations 1.20 + under the License. 1.21 +--> 1.22 + 1.23 +# org.apache.cordova.dialogs 1.24 + 1.25 +このプラグインはいくつかのネイティブのダイアログの UI 要素へのアクセスを提供します。 1.26 + 1.27 +## インストール 1.28 + 1.29 + cordova plugin add org.apache.cordova.dialogs 1.30 + 1.31 + 1.32 +## メソッド 1.33 + 1.34 +* `navigator.notification.alert` 1.35 +* `navigator.notification.confirm` 1.36 +* `navigator.notification.prompt` 1.37 +* `navigator.notification.beep` 1.38 + 1.39 +## navigator.notification.alert 1.40 + 1.41 +カスタムの警告またはダイアログ ボックスが表示されます。 ほとんどコルドバ ネイティブ] ダイアログ ボックスの使用この機能がいくつかのプラットフォームを使用して、ブラウザーの `alert` 関数は、通常より少なくカスタマイズ可能です。 1.42 + 1.43 + navigator.notification.alert(message, alertCallback, [title], [buttonName]) 1.44 + 1.45 + 1.46 +* **メッセージ**: ダイアログ メッセージ。*(文字列)* 1.47 + 1.48 +* **alertCallback**: 警告ダイアログが閉じられたときに呼び出すコールバック。*(機能)* 1.49 + 1.50 +* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Alert`) 1.51 + 1.52 +* **buttonName**: ボタンの名前。*(文字列)*(省略可能、既定値は`OK`) 1.53 + 1.54 +### 例 1.55 + 1.56 + function alertDismissed() { 1.57 + // do something 1.58 + } 1.59 + 1.60 + navigator.notification.alert( 1.61 + 'You are the winner!', // message 1.62 + alertDismissed, // callback 1.63 + 'Game Over', // title 1.64 + 'Done' // buttonName 1.65 + ); 1.66 + 1.67 + 1.68 +### サポートされているプラットフォーム 1.69 + 1.70 +* アマゾン火 OS 1.71 +* アンドロイド 1.72 +* ブラックベリー 10 1.73 +* Firefox の OS 1.74 +* iOS 1.75 +* Tizen 1.76 +* Windows Phone 7 と 8 1.77 +* Windows 8 1.78 + 1.79 +### Windows Phone 7 と 8 癖 1.80 + 1.81 +* 組み込みのブラウザー警告がない呼び出しを次のように 1 つをバインドすることができます `alert()` 、グローバル スコープで。 1.82 + 1.83 + window.alert = navigator.notification.alert; 1.84 + 1.85 + 1.86 +* 両方の `alert` と `confirm` は非ブロッキング呼び出し、結果は非同期的にのみ利用できます。 1.87 + 1.88 +### Firefox OS 互換: 1.89 + 1.90 +両方のネイティブ ブロック `window.alert()` ノン ブロッキングと `navigator.notification.alert()` は利用できます。 1.91 + 1.92 +## navigator.notification.confirm 1.93 + 1.94 +カスタマイズ可能な確認のダイアログ ボックスが表示されます。 1.95 + 1.96 + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) 1.97 + 1.98 + 1.99 +* **メッセージ**: ダイアログ メッセージ。*(文字列)* 1.100 + 1.101 +* **confirmCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)* 1.102 + 1.103 +* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Confirm`) 1.104 + 1.105 +* **buttonLabels**: ボタンのラベルを指定する文字列の配列。*(配列)*(省略可能、既定値は [ `OK,Cancel` ]) 1.106 + 1.107 +### confirmCallback 1.108 + 1.109 +`confirmCallback`の確認ダイアログ ボックスでボタンを押したときに実行されます。 1.110 + 1.111 +コールバック引数 `buttonIndex` *(番号)*は、押されたボタンのインデックス。 メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。 1.112 + 1.113 +### 例 1.114 + 1.115 + function onConfirm(buttonIndex) { 1.116 + alert('You selected button ' + buttonIndex); 1.117 + } 1.118 + 1.119 + navigator.notification.confirm( 1.120 + 'You are the winner!', // message 1.121 + onConfirm, // callback to invoke with index of button pressed 1.122 + 'Game Over', // title 1.123 + ['Restart','Exit'] // buttonLabels 1.124 + ); 1.125 + 1.126 + 1.127 +### サポートされているプラットフォーム 1.128 + 1.129 +* アマゾン火 OS 1.130 +* アンドロイド 1.131 +* ブラックベリー 10 1.132 +* Firefox の OS 1.133 +* iOS 1.134 +* Tizen 1.135 +* Windows Phone 7 と 8 1.136 +* Windows 8 1.137 + 1.138 +### Windows Phone 7 と 8 癖 1.139 + 1.140 +* 組み込みブラウザーの機能はありません `window.confirm` が割り当てることによってバインドすることができます。 1.141 + 1.142 + window.confirm = navigator.notification.confirm; 1.143 + 1.144 + 1.145 +* 呼び出しを `alert` と `confirm` では非ブロッキング、結果は非同期的にのみ使用できます。 1.146 + 1.147 +### Firefox OS 互換: 1.148 + 1.149 +両方のネイティブ ブロック `window.confirm()` ノン ブロッキングと `navigator.notification.confirm()` は利用できます。 1.150 + 1.151 +## navigator.notification.prompt 1.152 + 1.153 +ブラウザーのより詳細にカスタマイズはネイティブのダイアログ ボックスが表示されます `prompt` 関数。 1.154 + 1.155 + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) 1.156 + 1.157 + 1.158 +* **メッセージ**: ダイアログ メッセージ。*(文字列)* 1.159 + 1.160 +* **promptCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)* 1.161 + 1.162 +* **タイトル**: *(文字列)* (省略可能、既定値のタイトル] ダイアログ`Prompt`) 1.163 + 1.164 +* **buttonLabels**: ボタンを指定する文字列の配列*(配列)* (省略可能、既定値のラベル`["OK","Cancel"]`) 1.165 + 1.166 +* **これら**: 既定テキスト ボックスの入力値 ( `String` ) (省略可能、既定: 空の文字列) 1.167 + 1.168 +### promptCallback 1.169 + 1.170 +`promptCallback`プロンプト ダイアログ ボックス内のボタンのいずれかを押したときに実行されます。`results`コールバックに渡されるオブジェクトに、次のプロパティが含まれています。 1.171 + 1.172 +* **buttonIndex**: 押されたボタンのインデックス。*(数)*メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。 1.173 + 1.174 +* **input1**: プロンプト ダイアログ ボックスに入力したテキスト。*(文字列)* 1.175 + 1.176 +### 例 1.177 + 1.178 + function onPrompt(results) { 1.179 + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); 1.180 + } 1.181 + 1.182 + navigator.notification.prompt( 1.183 + 'Please enter your name', // message 1.184 + onPrompt, // callback to invoke 1.185 + 'Registration', // title 1.186 + ['Ok','Exit'], // buttonLabels 1.187 + 'Jane Doe' // defaultText 1.188 + ); 1.189 + 1.190 + 1.191 +### サポートされているプラットフォーム 1.192 + 1.193 +* アマゾン火 OS 1.194 +* アンドロイド 1.195 +* Firefox の OS 1.196 +* iOS 1.197 +* Windows Phone 7 と 8 1.198 + 1.199 +### Android の癖 1.200 + 1.201 +* Android は最大 3 つのボタンをサポートしているし、それ以上無視します。 1.202 + 1.203 +* アンドロイド 3.0 と後、ホロのテーマを使用するデバイスを逆の順序でボタンが表示されます。 1.204 + 1.205 +### Firefox OS 互換: 1.206 + 1.207 +両方のネイティブ ブロック `window.prompt()` ノン ブロッキングと `navigator.notification.prompt()` は利用できます。 1.208 + 1.209 +## navigator.notification.beep 1.210 + 1.211 +デバイス サウンドをビープ音を再生します。 1.212 + 1.213 + navigator.notification.beep(times); 1.214 + 1.215 + 1.216 +* **回**: ビープ音を繰り返す回数。*(数)* 1.217 + 1.218 +### 例 1.219 + 1.220 + // Beep twice! 1.221 + navigator.notification.beep(2); 1.222 + 1.223 + 1.224 +### サポートされているプラットフォーム 1.225 + 1.226 +* アマゾン火 OS 1.227 +* アンドロイド 1.228 +* ブラックベリー 10 1.229 +* iOS 1.230 +* Tizen 1.231 +* Windows Phone 7 と 8 1.232 +* Windows 8 1.233 + 1.234 +### アマゾン火 OS 癖 1.235 + 1.236 +* アマゾン火 OS デフォルト**設定/表示 & サウンド**パネルの下に指定した**通知音**を果たしています。 1.237 + 1.238 +### Android の癖 1.239 + 1.240 +* アンドロイド デフォルト**通知着信音****設定/サウンド & ディスプレイ**パネルの下に指定を果たしています。 1.241 + 1.242 +### Windows Phone 7 と 8 癖 1.243 + 1.244 +* コルドバ分布からジェネリック ビープ音ファイルに依存します。 1.245 + 1.246 +### Tizen の癖 1.247 + 1.248 +* Tizen は、メディア API 経由でオーディオ ファイルを再生してビープ音を実装します。 1.249 + 1.250 +* ビープ音ファイルする必要があります短いである必要があります、 `sounds` 、アプリケーションのルート ディレクトリのサブディレクトリと命名する必要があります`beep.wav`. 1.251 \ No newline at end of file