diff options
Diffstat (limited to 'StoneIsland/plugins/cordova-plugin-dialogs')
53 files changed, 539 insertions, 260 deletions
diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md b/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md index f7dbcaba..4c8e6a5e 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md @@ -27,7 +27,7 @@ There are multiple ways to contribute: report bugs, improve the docs, and contribute code. For instructions on this, start with the -[contribution overview](http://cordova.apache.org/#contribute). +[contribution overview](http://cordova.apache.org/contribute/). The details are explained there, but the important items are: - Sign and submit an Apache ICLA (Contributor License Agreement). diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/LICENSE b/StoneIsland/plugins/cordova-plugin-dialogs/LICENSE index 7a4a3ea2..7a4a3ea2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/LICENSE +++ b/StoneIsland/plugins/cordova-plugin-dialogs/LICENSE diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE b/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE index 8ec56a52..8ec56a52 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE +++ b/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/README.md index b16b9f9a..ea2b9311 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/README.md @@ -1,3 +1,7 @@ +--- +title: Dialogs +description: Use native dialog UI elements +--- <!-- # license: Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -17,9 +21,11 @@ # under the License. --> -# cordova-plugin-dialogs +|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI | +|:-:|:-:|:-:|:-:|:-:|:-:| +|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-dialogs/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-dialogs/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-dialogs/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-dialogs/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-dialogs/)|[](https://travis-ci.org/apache/cordova-plugin-dialogs)| -[](https://travis-ci.org/apache/cordova-plugin-dialogs) +# cordova-plugin-dialogs This plugin provides access to some native dialog UI elements via a global `navigator.notification` object. @@ -31,6 +37,8 @@ Although the object is attached to the global scoped `navigator`, it is not avai console.log(navigator.notification); } +Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Dialogs%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + ## Installation cordova plugin add cordova-plugin-dialogs @@ -77,6 +85,7 @@ function, which is typically less customizable. - Amazon Fire OS - Android - BlackBerry 10 +- Browser - Firefox OS - iOS - Tizen @@ -141,6 +150,7 @@ indexing, so the value is `1`, `2`, `3`, etc. - Amazon Fire OS - Android - BlackBerry 10 +- Browser - Firefox OS - iOS - Tizen @@ -212,6 +222,7 @@ contains the following properties: - Amazon Fire OS - Android +- Browser - Firefox OS - iOS - Windows Phone 7 and 8 @@ -250,6 +261,7 @@ The device plays a beep sound. - Amazon Fire OS - Android - BlackBerry 10 +- Browser - iOS - Tizen - Windows Phone 7 and 8 @@ -272,4 +284,3 @@ The device plays a beep sound. - Tizen implements beeps by playing an audio file via the media API. - The beep file must be short, must be located in a `sounds` subdirectory of the application's root directory, and must be named `beep.wav`. - diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/RELEASENOTES.md b/StoneIsland/plugins/cordova-plugin-dialogs/RELEASENOTES.md index 79571543..2b34048b 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/RELEASENOTES.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/RELEASENOTES.md @@ -20,120 +20,147 @@ --> # Release Notes -### 0.2.2 (Sept 25, 2013) -* CB-4889 bumping&resetting version -* [windows8] commandProxy was moved -* CB-4889 renaming reference in Notification.cs -* CB-4889 renaming org.apache.cordova.core.dialogs to org.apache.cordova.dialogs -* Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4592] [Blackberry10] Added beep support -* [CB-4752] Incremented plugin version on dev branch. +### 1.3.0 (Sep 08, 2016) +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) updated missing header file +* Select the text and put default value in the input directly. +* [CB-11281](https://issues.apache.org/jira/browse/CB-11281) **windows**: `defaultText` is not taken as input if no input by user fixed +* Separated `CSS` from `JS` code. Fixed the prompt dialog CSS to look close to native. Fixed the positioning of the prompt dialog for Windows. Fixed minor JSHint issues. +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* [CB-8773](https://issues.apache.org/jira/browse/CB-8773) Fix for **iOS 8** keyboard not appearing on prompt +* [CB-11677](https://issues.apache.org/jira/browse/CB-11677) **Android**: made text, entered to prompt dialog visible +* CB-8947:(**ios**) Fix crash. Convert non-string messages to strings. Added tests. +* Add badges for paramedic builds on Jenkins +* Add pull request template. +* [CB-11218](https://issues.apache.org/jira/browse/CB-11218) Convert button list to appropriate type +* Simply add **Browser** to supported platforms +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md - ### 0.2.3 (Oct 28, 2013) -* CB-5128: added repo + issue tag to plugin.xml for dialogs plugin -* new plugin execute arguments supported -* new plugin style -* smaller fonts styling input -* img files copied inside plugin -* style added -* prompt added -* styling from James -* fixed "exec" calls addedd css, but not working yet -* first (blind) try -* [CB-4915] Incremented plugin version on dev branch. +### 1.2.1 (Apr 15, 2016) +* [CB-10097](https://issues.apache.org/jira/browse/CB-10097) dialog doesn't show on **iOS** when called from a select list `onChange` event +* Remove `warning` emoji, as it doesn't correctly display in the docs website: http://cordova.apache.org/docs/en/dev/cordova-plugin-dialogs/index.html +* [CB-10727](https://issues.apache.org/jira/browse/CB-10727) Dialogs plugin has warnings on **iOS** +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins - -### 0.2.4 (Dec 4, 2013) -* add ubuntu platform -* 1. Added amazon-fireos platform. 2. Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'. -* added beep funtionality using ms-winsoundevent:Notfication.Default +### 1.2.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* [CB-8549](https://issues.apache.org/jira/browse/CB-8549) Updated source to pass `Fortify` scan. +* Fixing contribute link. +* add `CSS class` to prompt `div` for **Windows** platform +* [CB-9347](https://issues.apache.org/jira/browse/CB-9347) - fix to allow to stack multiple `UIAlertControllers` -### 0.2.5 (Jan 02, 2014) -* CB-4696 Fix compile error for Xcode 4.5. -* CB-5658 Add doc/index.md for Dialogs plugin -* CB-3762 Change prompt default to empty string -* Move images from css to img +### 1.1.1 (Jun 17, 2015) +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs +* fix npm md -### 0.2.6 (Feb 05, 2014) -* no need to recreate the manifest.webapp file after each `cordova prepare` for FFOS -* FFOS description added +### 1.1.0 (May 06, 2015) +* [CB-8928](https://issues.apache.org/jira/browse/CB-8928): Removed direct call to `toStaticHTML`, only call it if we are sure it's present. This closes #52 +* [CB-7734](https://issues.apache.org/jira/browse/CB-7734) - `navigator.notification.alert` or `navigator.notification.confirm` seem have a "many words" issue. (closes #39) + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated wp and bb specific references of old id to new id +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659): ios: 4.0.x Compatibility: Remove use of deprecated headers +* [CB-8565](https://issues.apache.org/jira/browse/CB-8565) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* [CB-8367](https://issues.apache.org/jira/browse/CB-8367) [org.apache.cordova.dialogs] Add Prompt support on Windows -### 0.2.7 (Apr 17, 2014) -* CB-6212: [iOS] fix warnings compiled under arm64 64-bit -* CB-6411: [BlackBerry10] Work around Audio playback issue -* CB-6411: [BlackBerry10] Updates to beep -* CB-6422: [windows8] use cordova/exec/proxy -* CB-6460: Update license headers -* Add NOTICE file +### 0.3.0 (Feb 04, 2015) +* Correct way to specify Windows platform in config.xml +* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension +* [CB-7955](https://issues.apache.org/jira/browse/CB-7955) Add support "browser" platform -### 0.2.8 (Jun 05, 2014) -* CB-6801 Add license -* running original windows.open, inAppBrowser is overriding it no need to place CSS in every page anymore -* CB-5945 [Windows8] do not call success callbacks until dialog is dismissed -* CB-4616 Returned index 0 was not documented for notification.prompt -* update docs to state that prompt is supported on windowsphone -* CB-6528 allow scroll on alert message content -* [CB-6628][amazon-fireos]dialogs plugin's confirm and prompt methods dont work confirm() method was missing amazon-fireos platform check. added that. prompt() method had bug. It is executed in a worker thread that does not have a message queue(or Looper object) associated with it and hence "can't create a handler" exception is thrown. To fix this issue, we need to create the EditText widget from within the UI thread. This was fixed sometime ago when we added fireos platform but commit got lost somewhere. So fixing it again now. -* CB-6491 add CONTRIBUTING.md -* Added check for isFinishing() on the parent activity to prevent crashes when trying to display dialogs when activity is in this phase of it's lifecycle -* CB-4966 Dialogs are in window now No need to add anything to manifest or index.html -* Removing FirefoxOS Quirks * no need to add special permission (it's different API with the same name) * notification.css is added automatically +### 0.2.11 (Dec 02, 2014) +* [CB-7737](https://issues.apache.org/jira/browse/CB-7737) lower min height for alert +* [CB-8038](https://issues.apache.org/jira/browse/CB-8038) backslash getting escaped twice in **BB10** +* [CB-8029](https://issues.apache.org/jira/browse/CB-8029) test 1-based indexing for confirm +* [CB-7639](https://issues.apache.org/jira/browse/CB-7639) Update docs + manual tests +* [CB-7639](https://issues.apache.org/jira/browse/CB-7639) Revert back `isAlertShowing` flag in case of exception to prevent queuing of future dialogs. +* [CB-7639](https://issues.apache.org/jira/browse/CB-7639) Handle button labels as array on windows +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* Check for `setTextDirection` API level +* **Android** Make spinner dialog to use `THEME_DEVICE_DEFAULT_LIGHT` (same as the other dialogs) +* **Android** Unbreak `API` level < `14` +* [CB-7414](https://issues.apache.org/jira/browse/CB-7414) **BB10** Document callback parameter for `navigator.notification.alert` +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin + +### 0.2.10 (Sep 17, 2014) +* [CB-7538](https://issues.apache.org/jira/browse/CB-7538) Android beep thread fix Beep now executes in it's own thread. It was previously executing in the main UI thread which was causing the application to lock up will the beep was occurring. Closing pull request +* Set dialog text dir to locale +* Renamed test dir, added nested plugin.xml +* added documentation for manual tests +* [CB-6965](https://issues.apache.org/jira/browse/CB-6965) Added manual tests +* [CB-6965](https://issues.apache.org/jira/browse/CB-6965) Port notification tests to test-framework ### 0.2.9 (Aug 06, 2014) * ubuntu: pass proper arguments to prompt callback * ubuntu: use TextField instead of TextInput * ubuntu: proper message escaping before passing to qml * **FFOS** update notification.js -* CB-6127 Updated translations for docs +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs * android: Explicitly apply default theme to dialogs * Fix Beep exception on Android when no argument passed -### 0.2.10 (Sep 17, 2014) -* CB-7538 Android beep thread fix Beep now executes in it's own thread. It was previously executing in the main UI thread which was causing the application to lock up will the beep was occurring. Closing pull request -* Set dialog text dir to locale -* Renamed test dir, added nested plugin.xml -* added documentation for manual tests -* CB-6965 Added manual tests -* CB-6965 Port notification tests to test-framework +### 0.2.8 (Jun 05, 2014) +* [CB-6801](https://issues.apache.org/jira/browse/CB-6801) Add license +* running original windows.open, inAppBrowser is overriding it no need to place CSS in every page anymore +* [CB-5945](https://issues.apache.org/jira/browse/CB-5945) [Windows8] do not call success callbacks until dialog is dismissed +* [CB-4616](https://issues.apache.org/jira/browse/CB-4616) Returned index 0 was not documented for notification.prompt +* update docs to state that prompt is supported on windowsphone +* [CB-6528](https://issues.apache.org/jira/browse/CB-6528) allow scroll on alert message content +* [CB-6628][amazon-fireos]dialogs plugin's confirm and prompt methods dont work confirm() method was missing amazon-fireos platform check. added that. prompt() method had bug. It is executed in a worker thread that does not have a message queue(or Looper object) associated with it and hence "can't create a handler" exception is thrown. To fix this issue, we need to create the EditText widget from within the UI thread. This was fixed sometime ago when we added fireos platform but commit got lost somewhere. So fixing it again now. +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Added check for isFinishing() on the parent activity to prevent crashes when trying to display dialogs when activity is in this phase of it's lifecycle +* [CB-4966](https://issues.apache.org/jira/browse/CB-4966) Dialogs are in window now No need to add anything to manifest or index.html +* Removing FirefoxOS Quirks * no need to add special permission (it's different API with the same name) * notification.css is added automatically -### 0.2.11 (Dec 02, 2014) -* [CB-7737] lower min height for alert -* CB-8038 backslash getting escaped twice in **BB10** -* CB-8029 test 1-based indexing for confirm -* CB-7639 Update docs + manual tests -* CB-7639 Revert back `isAlertShowing` flag in case of exception to prevent queuing of future dialogs. -* CB-7639 Handle button labels as array on windows -* CB-7977 Mention `deviceready` in plugin docs -* Check for `setTextDirection` API level -* **Android** Make spinner dialog to use `THEME_DEVICE_DEFAULT_LIGHT` (same as the other dialogs) -* **Android** Unbreak `API` level < `14` -* CB-7414 **BB10** Document callback parameter for `navigator.notification.alert` -* CB-7700 cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs -* CB-7571 Bump version of nested plugin to match parent plugin +### 0.2.7 (Apr 17, 2014) +* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit +* [CB-6411](https://issues.apache.org/jira/browse/CB-6411): [BlackBerry10] Work around Audio playback issue +* [CB-6411](https://issues.apache.org/jira/browse/CB-6411): [BlackBerry10] Updates to beep +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers +* Add NOTICE file -### 0.3.0 (Feb 04, 2015) -* Correct way to specify Windows platform in config.xml -* CB-8351 ios: Use argumentForIndex rather than NSArray extension -* CB-7955 Add support "browser" platform +### 0.2.6 (Feb 05, 2014) +* no need to recreate the manifest.webapp file after each `cordova prepare` for FFOS +* FFOS description added -### 1.0.0 (Apr 15, 2015) -* CB-8746 gave plugin major version bump -* CB-8683 updated wp and bb specific references of old id to new id -* CB-8683 changed plugin-id to pacakge-name -* CB-8653 properly updated translated docs to use new id -* CB-8653 updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* CB-8653 Updated Readme -* CB-8659: ios: 4.0.x Compatibility: Remove use of deprecated headers -* CB-8565 Integrate TravisCI -* CB-8438 cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs -* CB-8538 Added package.json file -* CB-8367 [org.apache.cordova.dialogs] Add Prompt support on Windows +### 0.2.5 (Jan 02, 2014) +* [CB-4696](https://issues.apache.org/jira/browse/CB-4696) Fix compile error for Xcode 4.5. +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Dialogs plugin +* [CB-3762](https://issues.apache.org/jira/browse/CB-3762) Change prompt default to empty string +* Move images from css to img -### 1.1.0 (May 06, 2015) -* CB-8928: Removed direct call to `toStaticHTML`, only call it if we are sure it's present. This closes #52 -* CB-7734 - `navigator.notification.alert` or `navigator.notification.confirm` seem have a "many words" issue. (closes #39) +### 0.2.4 (Dec 4, 2013) +* add ubuntu platform +* 1. Added amazon-fireos platform. 2. Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'. +* added beep funtionality using ms-winsoundevent:Notfication.Default -### 1.1.1 (Jun 17, 2015) -* CB-9128 cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs -* fix npm md +### 0.2.3 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for dialogs plugin +* new plugin execute arguments supported +* new plugin style +* smaller fonts styling input +* img files copied inside plugin +* style added +* prompt added +* styling from James +* fixed "exec" calls addedd css, but not working yet +* first (blind) try +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. + +### 0.2.2 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming reference in Notification.cs +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.dialogs to org.apache.cordova.dialogs +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4592](https://issues.apache.org/jira/browse/CB-4592) [Blackberry10] Added beep support +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/README.md index 355cd4d1..355cd4d1 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md index c003d401..c003d401 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md index e7df5fea..e7df5fea 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md index 9ff4251e..9ff4251e 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md index 994c8264..994c8264 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md index fec09396..fec09396 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md index 8a72905d..8a72905d 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md index e8e02c7a..e8e02c7a 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md index 0722658b..0722658b 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md index b5308605..b5308605 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md index 04532da8..04532da8 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md index 8216d8cf..8216d8cf 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md index 45fa937c..45fa937c 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md index 462d5ac2..462d5ac2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md index 49474ead..49474ead 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md index c8c26c3d..c8c26c3d 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md index b47fc5f9..b47fc5f9 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md +++ b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/package.json b/StoneIsland/plugins/cordova-plugin-dialogs/package.json index 3fd10da8..f85f14ce 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/package.json +++ b/StoneIsland/plugins/cordova-plugin-dialogs/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-dialogs", - "version": "1.1.1", + "version": "1.3.0", "description": "Cordova Notification Plugin", "cordova": { "id": "cordova-plugin-dialogs", @@ -38,6 +38,20 @@ "cordova-windows8", "cordova-windows" ], + "scripts": { + "test": "npm run jshint", + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" + }, "author": "Apache Software Foundation", - "license": "Apache 2.0" + "license": "Apache-2.0", + "engines": { + "cordovaDependencies": { + "2.0.0": { + "cordova": ">100" + } + } + }, + "devDependencies": { + "jshint": "^2.6.0" + } } diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml b/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml index 6d6235fa..1069cce1 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml @@ -20,7 +20,7 @@ <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-dialogs" - version="1.1.1"> + version="1.3.0"> <name>Notification</name> <description>Cordova Notification Plugin</description> @@ -41,13 +41,13 @@ </feature> </config-file> - <asset src="www/firefoxos/notification.css" target="css/notification.css" /> - <asset src="www/firefoxos/danger-press.png" target="img/danger-press.png" /> - <asset src="www/firefoxos/danger.png" target="img/danger.png" /> - <asset src="www/firefoxos/default.png" target="img/default.png" /> - <asset src="www/firefoxos/gradient.png" target="img/gradient.png" /> - <asset src="www/firefoxos/pattern.png" target="img/pattern.png" /> - <asset src="www/firefoxos/recommend.png" target="img/recommend.png" /> + <asset src="www/firefoxos/notification.css" target="css/notification.css" /> + <asset src="www/firefoxos/danger-press.png" target="img/danger-press.png" /> + <asset src="www/firefoxos/danger.png" target="img/danger.png" /> + <asset src="www/firefoxos/default.png" target="img/default.png" /> + <asset src="www/firefoxos/gradient.png" target="img/gradient.png" /> + <asset src="www/firefoxos/pattern.png" target="img/pattern.png" /> + <asset src="www/firefoxos/recommend.png" target="img/recommend.png" /> <js-module src="src/firefoxos/notification.js" name="dialogs-impl"> <runs /> </js-module> @@ -110,9 +110,9 @@ </feature> </config-file> <header-file src="src/ios/CDVNotification.h" /> - <source-file src="src/ios/CDVNotification.m" /> - <resource-file src="src/ios/CDVNotification.bundle" /> - <framework src="AudioToolbox.framework" weak="true" /> + <source-file src="src/ios/CDVNotification.m" /> + <resource-file src="src/ios/CDVNotification.bundle" /> + <framework src="AudioToolbox.framework" weak="true" /> </platform> <!-- blackberry10 --> @@ -167,5 +167,7 @@ <js-module src="src/windows/NotificationProxy.js" name="NotificationProxy"> <merges target="" /> </js-module> + + <asset src="www/windows/notification.css" target="css/notification.css" /> </platform> </plugin> diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java b/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java index 3bc3cee6..f19bc888 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java @@ -21,6 +21,7 @@ package org.apache.cordova.dialogs; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.LOG; import org.apache.cordova.PluginResult; import org.json.JSONArray; import org.json.JSONException; @@ -31,6 +32,7 @@ import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.ProgressDialog; import android.content.DialogInterface; +import android.content.res.Resources; import android.media.Ringtone; import android.media.RingtoneManager; import android.net.Uri; @@ -48,6 +50,8 @@ import android.widget.TextView; */ public class Notification extends CordovaPlugin { + private static final String LOG_TAG = "Notification"; + public int confirmResult = -1; public ProgressDialog spinnerDialog = null; public ProgressDialog progressDialog = null; @@ -139,6 +143,7 @@ public class Notification extends CordovaPlugin { try { Thread.sleep(100); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); } } } @@ -215,7 +220,9 @@ public class Notification extends CordovaPlugin { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 1)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on first button."); + } } // Second button @@ -228,7 +235,9 @@ public class Notification extends CordovaPlugin { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 2)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on second button."); + } } // Third button @@ -241,7 +250,9 @@ public class Notification extends CordovaPlugin { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 3)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on third button."); + } } dlg.setOnCancelListener(new AlertDialog.OnCancelListener() { public void onCancel(DialogInterface dialog) @@ -276,7 +287,14 @@ public class Notification extends CordovaPlugin { Runnable runnable = new Runnable() { public void run() { final EditText promptInput = new EditText(cordova.getActivity()); - promptInput.setHint(defaultText); + + /* CB-11677 - By default, prompt input text color is set according current theme. + But for some android versions is not visible (for example 5.1.1). + android.R.color.primary_text_light will make text visible on all versions. */ + Resources resources = cordova.getActivity().getResources(); + int promptInputTextColor = resources.getColor(android.R.color.primary_text_light); + promptInput.setTextColor(promptInputTextColor); + promptInput.setText(defaultText); AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); dlg.setMessage(message); dlg.setTitle(title); @@ -296,11 +314,15 @@ public class Notification extends CordovaPlugin { try { result.put("buttonIndex",1); result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); - } catch (JSONException e) { e.printStackTrace(); } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on first button.", e); + } callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on first button."); + } } // Second button @@ -313,11 +335,15 @@ public class Notification extends CordovaPlugin { try { result.put("buttonIndex",2); result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); - } catch (JSONException e) { e.printStackTrace(); } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on second button.", e); + } callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on second button."); + } } // Third button @@ -330,11 +356,15 @@ public class Notification extends CordovaPlugin { try { result.put("buttonIndex",3); result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); - } catch (JSONException e) { e.printStackTrace(); } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on third button.", e); + } callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); } }); - } catch (JSONException e) { } + } catch (JSONException e) { + LOG.d(LOG_TAG,"JSONException on third button."); + } } dlg.setOnCancelListener(new AlertDialog.OnCancelListener() { public void onCancel(DialogInterface dialog){ diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/blackberry10/index.js b/StoneIsland/plugins/cordova-plugin-dialogs/src/blackberry10/index.js index 3660f667..4969a770 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/blackberry10/index.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/blackberry10/index.js @@ -14,6 +14,8 @@ * limitations under the License. */ +/* global qnx, PluginResult */ + function showDialog(args, dialogType, result) { //Unpack and map the args var msg = JSON.parse(decodeURIComponent(args[0])), diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js index b6986fd0..aea562d0 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js @@ -60,7 +60,8 @@ function modal(message, callback, title, buttonLabels, domObjects) { var menu = modalDocument.createElement('menu'); box.appendChild(menu); for (var index = 0; index < buttonLabels.length; index++) { - addButton(buttonLabels[index], index, (index === 0)); + // TODO: last button listens to the cancel key + addButton(buttonLabels[index], (index+1), (index === 0)); } modalDocument.body.appendChild(box); @@ -83,12 +84,12 @@ function modal(message, callback, title, buttonLabels, domObjects) { result = { input1: '', buttonIndex: 0 - } + }; } mainWindow.setTimeout(function() { callback(result); }, 10); - }; + } modalWindow.addEventListener('unload', onUnload, false); // call callback and destroy modal @@ -109,7 +110,7 @@ function modal(message, callback, title, buttonLabels, domObjects) { } response = response || labelIndex; callback(response); - } + }; } } diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.bundle/beep.wav b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.bundle/beep.wav Binary files differindex 05f5997f..05f5997f 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.bundle/beep.wav +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.bundle/beep.wav diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h index 9253f6a9..9253f6a9 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m index 1581ad3c..0dd3d2cb 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m @@ -23,6 +23,7 @@ #define DIALOG_TYPE_PROMPT @"prompt" static void soundCompletionCallback(SystemSoundID ssid, void* data); +static NSMutableArray *alertList = nil; @implementation CDVNotification @@ -39,7 +40,7 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType { - NSUInteger count = [buttons count]; + int count = (int)[buttons count]; #ifdef __IPHONE_8_0 if (NSClassFromString(@"UIAlertController")) { @@ -58,33 +59,32 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); alertController.view.frame = alertFrame; } - + + __weak CDVNotification* weakNotif = self; + for (int n = 0; n < count; n++) { - - UIAlertAction* action = [UIAlertAction actionWithTitle:[buttons objectAtIndex:n] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) - { - CDVPluginResult* result; - - if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { - - NSString* value0 = [[alertController.textFields objectAtIndex:0] text]; - NSDictionary* info = @{ - @"buttonIndex":@(n + 1), - @"input1":(value0 ? value0 : [NSNull null]) - }; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; - - } else { - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(n + 1)]; - - } - - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - - }]; - [alertController addAction:action]; - + [alertController addAction:[UIAlertAction actionWithTitle:[buttons objectAtIndex:n] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) + { + CDVPluginResult* result; + + if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) + { + NSString* value0 = [[alertController.textFields objectAtIndex:0] text]; + NSDictionary* info = @{ + @"buttonIndex":@(n + 1), + @"input1":(value0 ? value0 : [NSNull null]) + }; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; + } + else + { + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(n + 1)]; + } + + [weakNotif.commandDelegate sendPluginResult:result callbackId:callbackId]; + }]]; } if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { @@ -94,12 +94,19 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); }]; } + if(!alertList) + alertList = [[NSMutableArray alloc] init]; + [alertList addObject:alertController]; + if ([alertList count]==1) { + [self presentAlertcontroller]; + } - [self.viewController presentViewController:alertController animated:YES completion:nil]; - - } else { + } + else + { #endif + CDVAlertView* alertView = [[CDVAlertView alloc] initWithTitle:title message:message @@ -183,6 +190,14 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); [self.commandDelegate sendPluginResult:result callbackId:cdvAlertView.callbackId]; } +- (void)didPresentAlertView:(UIAlertView*)alertView +{ + //show keyboard on iOS 8 + if (alertView.alertViewStyle == UIAlertViewStylePlainTextInput){ + [[alertView textFieldAtIndex:0] selectAll:nil]; + } +} + static void playBeep(int count) { SystemSoundID completeSound; NSInteger cbDataCount = count; @@ -211,6 +226,26 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data) { playBeep([count intValue]); } +-(UIViewController *)getTopPresentedViewController { + UIViewController *presentingViewController = self.viewController; + while(presentingViewController.presentedViewController != nil && ![presentingViewController.presentedViewController isBeingDismissed]) + { + presentingViewController = presentingViewController.presentedViewController; + } + return presentingViewController; +} + +-(void)presentAlertcontroller { + + __weak CDVNotification* weakNotif = self; + [self.getTopPresentedViewController presentViewController:[alertList firstObject] animated:YES completion:^{ + [alertList removeObject:[alertList firstObject]]; + if ([alertList count]>0) { + [weakNotif presentAlertcontroller]; + } + }]; + +} @end diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.cpp b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.cpp index d0adf892..d0adf892 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.cpp +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.cpp diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h index 53430738..53430738 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml index 5fdc7d31..5fdc7d31 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js b/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js index d1eb3448..2d32f836 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js @@ -17,17 +17,36 @@ * specific language governing permissions and limitations * under the License. * -*/ + */ -/*global Windows:true */ +/*global Windows:true, WinJS, toStaticHTML */ var cordova = require('cordova'); +var urlutil = require('cordova/urlutil'); var isAlertShowing = false; var alertStack = []; +function createCSSElem(fileName) { + var elemId = fileName.substr(0, fileName.lastIndexOf(".")) + "-plugin-style"; + // If the CSS element exists, don't recreate it. + if (document.getElementById(elemId)) { + return false; + } + + // Create CSS and append it to DOM. + var $elem = document.createElement('link'); + $elem.id = elemId; + $elem.rel = "stylesheet"; + $elem.type = "text/css"; + $elem.href = urlutil.makeAbsolute("/www/css/" + fileName); + + document.head.appendChild($elem); + return true; +} + // CB-8928: When toStaticHTML is undefined, prompt fails to run -function _cleanHtml(html) { return html; } +var _cleanHtml = function(html) { return html; }; if (typeof toStaticHTML !== 'undefined') { _cleanHtml = toStaticHTML; } @@ -36,66 +55,53 @@ if (typeof toStaticHTML !== 'undefined') { // simple html-based implementation until it is available function createPromptDialog(title, message, buttons, defaultText, callback) { - var isPhone = cordova.platformId == "windows" && WinJS.Utilities.isPhone;; + var isPhone = cordova.platformId === "windows" && WinJS.Utilities.isPhone; + var isWindows = !!cordova.platformId.match(/windows/); + + createCSSElem("notification.css"); var dlgWrap = document.createElement("div"); - dlgWrap.style.position = "absolute"; - dlgWrap.style.width = "100%"; - dlgWrap.style.height = "100%"; - dlgWrap.style.backgroundColor = "rgba(0,0,0,0.25)"; - dlgWrap.style.zIndex = "100000"; + dlgWrap.className = "dlgWrap"; var dlg = document.createElement("div"); - dlg.style.width = "100%"; - dlg.style.minHeight = "180px"; - dlg.style.height = "auto"; - dlg.style.overflow = "auto"; - dlg.style.backgroundColor = "white"; - dlg.style.position = "relative"; - dlg.style.lineHeight = "2"; + dlg.className = "dlgContainer"; - if (isPhone) { - dlg.style.padding = "0px 5%"; - } else { - dlg.style.top = "50%"; // center vertically - dlg.style.transform = "translateY(-50%)"; - dlg.style.padding = "0px 30%"; + if (isWindows) { + dlg.className += " dlgContainer-windows"; + } else if (isPhone) { + dlg.className += " dlgContainer-phone"; } + // dialog layout template - dlg.innerHTML = _cleanHtml("<span id='lbl-title' style='font-size: 24pt'></span><br/>" // title - + "<span id='lbl-message'></span><br/>" // message - + "<input id='prompt-input' style='width: 100%'/><br/>"); // input fields + dlg.innerHTML = _cleanHtml("<span id='lbl-title'></span><br/>" + // title + "<span id='lbl-message'></span><br/>" + // message + "<input id='prompt-input'/><br/>"); // input fields dlg.querySelector('#lbl-title').appendChild(document.createTextNode(title)); dlg.querySelector('#lbl-message').appendChild(document.createTextNode(message)); dlg.querySelector('#prompt-input').setAttribute('placeholder', defaultText); + dlg.querySelector('#prompt-input').setAttribute('value', defaultText); function makeButtonCallback(idx) { return function () { - var value = promptInput = dlg.querySelector('#prompt-input').value; + var value = dlg.querySelector('#prompt-input').value || defaultText; dlgWrap.parentNode.removeChild(dlgWrap); if (callback) { callback({ input1: value, buttonIndex: idx }); } - } + }; } function addButton(idx, label) { var button = document.createElement('button'); - button.style.margin = "8px 0 8px 16px"; - button.style.float = "right"; - button.style.fontSize = "12pt"; + button.className = "dlgButton"; button.tabIndex = idx; button.onclick = makeButtonCallback(idx + 1); - if (idx == 0) { - button.style.color = "white"; - button.style.backgroundColor = "#464646"; - } else { - button.style.backgroundColor = "#cccccc"; + if (idx === 0) { + button.className += " dlgButtonFirst"; } - button.style.border = "none"; button.appendChild(document.createTextNode(label)); dlg.appendChild(button); } @@ -109,7 +115,7 @@ function createPromptDialog(title, message, buttons, defaultText, callback) { document.body.appendChild(dlgWrap); // make sure input field is under focus - dlg.querySelector('#prompt-input').focus(); + dlg.querySelector('#prompt-input').select(); return dlgWrap; } @@ -134,7 +140,9 @@ module.exports = { md.commands.append(new Windows.UI.Popups.UICommand(_buttonLabel)); md.showAsync().then(function() { isAlertShowing = false; - win && win(); + if (win) { + win(); + } if (alertStack.length) { setTimeout(alertStack.shift(), 0); @@ -204,7 +212,9 @@ module.exports = { md.showAsync().then(function(res) { isAlertShowing = false; var result = res ? buttons.indexOf(res.label) + 1 : 0; - win && win(result); + if (win) { + win(result); + } if (alertStack.length) { setTimeout(alertStack.shift(), 0); } @@ -236,7 +246,9 @@ module.exports = { } else { snd.removeEventListener("ended", onEvent); snd = null; - winX && winX(); // notification.js just sends null, but this is future friendly + if (winX) { + winX(); // notification.js just sends null, but this is future friendly + } } count--; }; diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/Notification.cs b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/Notification.cs index b6216848..b6216848 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/Notification.cs +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/Notification.cs diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml index 2d564fba..2d564fba 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs index 50b2f2a8..50b2f2a8 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav Binary files differindex d0ad085f..d0ad085f 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav +++ b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml b/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml index f021ddd5..55675b20 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml @@ -20,7 +20,7 @@ <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-dialogs-tests" - version="1.1.1"> + version="1.3.0"> <name>Cordova Notification Plugin Tests</name> <license>Apache 2.0</license> diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js b/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js index 16e9cd99..7056c0db 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js @@ -19,6 +19,9 @@ * */ +/* jshint jasmine: true */ +/* global cordova */ + exports.defineAutoTests = function () { describe('Notification (navigator.notification)', function () { it("should exist", function () { @@ -57,12 +60,12 @@ exports.defineManualTests = function (contentEl, createActionButton) { var logLine = document.createElement('div'); logLine.innerHTML = message; log.appendChild(logLine); - } + }; var clearLog = function () { var log = document.getElementById('info'); log.innerHTML = ''; - } + }; var beep = function () { console.log("beep()"); @@ -111,14 +114,14 @@ exports.defineManualTests = function (contentEl, createActionButton) { buttons); }; - var promptDialog = function (message, title, buttons) { + var promptDialog = function (message, title, buttons,defaultText) { clearLog(); navigator.notification.prompt(message, function (r) { if (r && r.buttonIndex === 0) { var msg = "Dismissed dialog"; if (r.input1) { - msg += " with input: " + r.input1 + msg += " with input: " + r.input1; } logMessage(msg); console.log(msg); @@ -128,7 +131,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { } }, title, - buttons); + buttons,defaultText); }; /******************************************************************************/ @@ -144,13 +147,15 @@ exports.defineManualTests = function (contentEl, createActionButton) { '<p/> <div id="confirm"></div>' + 'Expected result: Dialog will say "You pressed confirm". Press Yes, No, or Maybe, Not Sure to close dialog. Status box will tell you what option you selected, and should use 1-based indexing.' + '<p/> <div id="prompt"></div>' + - 'Expected result: Dialog will say "You pressed prompt". Enter any message and press Yes, No, or Maybe, Not Sure to close dialog. Status box will tell you what option you selected and message you entered, and should use 1-based indexing.' + + 'Expected result: Dialog will say "You pressed prompt". Enter any message and press Yes, No, or Maybe, Not Sure to close dialog. Status box will tell you what option you selected and message you entered or if empty, it will display "Default Text", and should use 1-based indexing.' + '<p/> <div id="built_in_alert"></div>' + 'Expected result: Dialog will have title "index.html" and say "You pressed alert" Press OK to close dialog. Nothing will get updated in status box.' + '<p/> <div id="built_in_confirm"></div>' + 'Expected result: Dialog will have title "index.html" and say "You selected confirm". Press Cancel or OK to close dialog. Nothing will get updated in status box.' + '<p/> <div id="built_in_prompt"></div>' + - 'Expected result: Dialog will have title "index.html" and say "This is a prompt". "Default value" will be in text box. Press Cancel or OK to close dialog. Nothing will get updated in status box.'; + 'Expected result: Dialog will have title "index.html" and say "This is a prompt". "Default value" will be in text box. Press Cancel or OK to close dialog. Nothing will get updated in status box.' + + '<p/> <h3>CB-8947 Tests</h3><div id="cb8947"></div>' + + 'Expected results: Dialogs will not crash iOS'; contentEl.innerHTML = '<div id="info"></div>' + dialogs_tests; @@ -177,18 +182,52 @@ exports.defineManualTests = function (contentEl, createActionButton) { }, 'confirm'); createActionButton('Prompt Dialog', function () { - promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']); + promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure'],'Default Text'); }, 'prompt'); createActionButton('Built-in Alert Dialog', function () { - typeof alert === 'function' && alert('You pressed alert'); + if (typeof alert === 'function') { + alert('You pressed alert'); + } }, 'built_in_alert'); createActionButton('Built-in Confirm Dialog', function () { - typeof confirm === 'function' && confirm('You selected confirm'); + if (typeof confirm === 'function') { + confirm('You selected confirm'); + } }, 'built_in_confirm'); createActionButton('Built-in Prompt Dialog', function () { - typeof prompt === 'function' && prompt('This is a prompt', 'Default value'); + if (typeof prompt === 'function') { + prompt('This is a prompt', 'Default value'); + } }, 'built_in_prompt'); + + // CB-8947 - ensure number messages don't crash iOS + createActionButton('Alert Dialog with Number', function () { + var callback = function() { clearLog(); console.log("Test passed"); }; + navigator.notification.alert(17, callback); + }, 'cb8947'); + + // CB-8947 - ensure object messages don't crash iOS + createActionButton('Alert Dialog with Object', function () { + var object = { number: 42, message: "Make sure an object doesn't crash iOS", issue: 'CB-8947'}; + var callback = function() { clearLog(); console.log("Test passed"); }; + navigator.notification.alert(object, callback); + }, 'cb8947'); + + // CB-8947 - ensure object messages don't crash iOS + createActionButton('Confirm Dialog with Object', function () { + var object = { number: 42, message: "Make sure an object doesn't crash iOS", issue: 'CB-8947'}; + var callback = function() { clearLog(); console.log("Test passed"); }; + navigator.notification.confirm(object, callback); + }, 'cb8947'); + + // CB-8947 - ensure object messages don't crash iOS + createActionButton('Prompt Dialog with Object', function () { + var object = { number: 42, message: "Make sure an object doesn't crash iOS", issue: 'CB-8947'}; + var callback = function() { clearLog(); console.log("Test passed"); }; + navigator.notification.prompt(object, callback); + }, 'cb8947'); + }; diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/android/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/android/notification.js index 8936a5c2..8936a5c2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/android/notification.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/android/notification.js diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js index 401049e8..da2e75d1 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js @@ -21,20 +21,24 @@ module.exports = function (quantity) { var count = 0, - beepObj, - play = function () { - //create new object every time due to strage playback behaviour - beepObj = new Audio('local:///chrome/plugin/cordova-plugin-dialogs/notification-beep.wav'); - beepObj.addEventListener("ended", callback); - beepObj.play(); - }, - callback = function () { - if (--count > 0) { - play(); - } else { - delete beepObj; - } - }; + beepObj; + + function callback() { + if (--count > 0) { + play(); + } else { + beepObj.removeEventListener("ended", callback); + beepObj = null; + } + } + + function play() { + //create new object every time due to strage playback behaviour + beepObj = new Audio('local:///chrome/plugin/cordova-plugin-dialogs/notification-beep.wav'); + beepObj.addEventListener("ended", callback); + beepObj.play(); + } + count += quantity || 1; if (count > 0) { play(); diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/notification-beep.wav b/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/notification-beep.wav Binary files differindex d0ad085f..d0ad085f 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/notification-beep.wav +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/notification-beep.wav diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js index e8753093..1fdfafd7 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js @@ -65,6 +65,21 @@ module.exports.prompt = window.navigator.notification.prompt = function(message, }; +var audioContext = (function() { + // Determine if the Audio API is supported by this browser + var AudioApi = window.AudioContext; + if (!AudioApi) { + AudioApi = window.webkitAudioContext; + } + + if (AudioApi) { + // The Audio API is supported, so create a singleton instance of the AudioContext + return new AudioApi(); + } + + return undefined; +}()); + module.exports.beep = window.navigator.notification.beep = function(times) { if (times > 0) { var BEEP_DURATION = 700; @@ -98,18 +113,3 @@ module.exports.beep = window.navigator.notification.beep = function(times) { } } }; - -var audioContext = (function() { - // Determine if the Audio API is supported by this browser - var AudioApi = window.AudioContext; - if (!AudioApi) { - AudioApi = window.webkitAudioContext; - } - - if (AudioApi) { - // The Audio API is supported, so create a singleton instance of the AudioContext - return new AudioApi(); - } - - return undefined; -}()); diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger-press.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger-press.png Binary files differindex d7529b5b..d7529b5b 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger-press.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger-press.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png Binary files differindex 400e3ae3..400e3ae3 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png Binary files differindex 2ff298a1..2ff298a1 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png Binary files differindex b2885450..b2885450 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css index 34d92b88..34d92b88 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png Binary files differindex af03f569..af03f569 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png Binary files differindex 42aed390..42aed390 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js index c3f70d07..4db8f0f2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js @@ -37,9 +37,10 @@ module.exports = { * @param {String} buttonLabel Label of the close button (default: OK) */ alert: function(message, completeCallback, title, buttonLabel) { - var _title = (title || "Alert"); + var _message = (typeof message === "string" ? message : JSON.stringify(message)); + var _title = (typeof title === "string" ? title : "Alert"); var _buttonLabel = (buttonLabel || "OK"); - exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]); + exec(completeCallback, null, "Notification", "alert", [_message, _title, _buttonLabel]); }, /** @@ -52,7 +53,8 @@ module.exports = { * @param {Array} buttonLabels Array of the labels of the buttons (default: ['OK', 'Cancel']) */ confirm: function(message, resultCallback, title, buttonLabels) { - var _title = (title || "Confirm"); + var _message = (typeof message === "string" ? message : JSON.stringify(message)); + var _title = (typeof title === "string" ? title : "Confirm"); var _buttonLabels = (buttonLabels || ["OK", "Cancel"]); // Strings are deprecated! @@ -60,23 +62,9 @@ module.exports = { console.log("Notification.confirm(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array)."); } - // Some platforms take an array of button label names. - // Other platforms take a comma separated list. - // For compatibility, we convert to the desired type based on the platform. - if (platform.id == "amazon-fireos" || platform.id == "android" || platform.id == "ios" || - platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu" || - platform.id == "windows8" || platform.id == "windows") { + _buttonLabels = convertButtonLabels(_buttonLabels); - if (typeof _buttonLabels === 'string') { - _buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here - } - } else { - if (Array.isArray(_buttonLabels)) { - var buttonLabelArray = _buttonLabels; - _buttonLabels = buttonLabelArray.toString(); - } - } - exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]); + exec(resultCallback, null, "Notification", "confirm", [_message, _title, _buttonLabels]); }, /** @@ -92,9 +80,17 @@ module.exports = { * @param {String} defaultText Textbox input value (default: empty string) */ prompt: function(message, resultCallback, title, buttonLabels, defaultText) { - var _message = (message || "Prompt message"); - var _title = (title || "Prompt"); + var _message = (typeof message === "string" ? message : JSON.stringify(message)); + var _title = (typeof title === "string" ? title : "Prompt"); var _buttonLabels = (buttonLabels || ["OK","Cancel"]); + + // Strings are deprecated! + if (typeof _buttonLabels === 'string') { + console.log("Notification.prompt(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array)."); + } + + _buttonLabels = convertButtonLabels(_buttonLabels); + var _defaultText = (defaultText || ""); exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]); }, @@ -110,3 +106,25 @@ module.exports = { exec(null, null, "Notification", "beep", [ defaultedCount ]); } }; + +function convertButtonLabels(buttonLabels) { + + // Some platforms take an array of button label names. + // Other platforms take a comma separated list. + // For compatibility, we convert to the desired type based on the platform. + if (platform.id == "amazon-fireos" || platform.id == "android" || platform.id == "ios" || + platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu" || + platform.id == "windows8" || platform.id == "windows") { + + if (typeof buttonLabels === 'string') { + buttonLabels = buttonLabels.split(","); // not crazy about changing the var type here + } + } else { + if (Array.isArray(buttonLabels)) { + var buttonLabelArray = buttonLabels; + buttonLabels = buttonLabelArray.toString(); + } + } + + return buttonLabels; +} diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/windows/notification.css b/StoneIsland/plugins/cordova-plugin-dialogs/www/windows/notification.css new file mode 100644 index 00000000..785039ba --- /dev/null +++ b/StoneIsland/plugins/cordova-plugin-dialogs/www/windows/notification.css @@ -0,0 +1,84 @@ +/* + * + * 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 + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +.dlgWrap { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.25); + z-index: 100000; + top: 0; +} + +.dlgContainer { + width: 100%; + min-height: 180px; + height: auto; + overflow: auto; + background-color: white; + position: relative; + line-height: 2; + top: 50%; + transform: translateY(-50%); + padding: 0 30%; +} + +.dlgContainer #lbl-title { + font-size: 24pt; +} + +.dlgContainer #prompt-input { + width: 100%; +} + +.dlgButton { + margin: 8px 0 0 16px; + float: right; + font-size: 11pt; + background-color: #cccccc; + border: none; + font-weight: 600; + font-family: "Segoe UI", Arial, sans-serif; + padding: 0 22px; +} + +.dlgButton.dlgButtonFirst { + color: white; + background-color: #464646; +} + +.dlgContainer.dlgContainer-windows { + width: 50%; + max-width: 680px; + padding: 0 5%; + top: 50%; + left: 50%; + position: fixed; + transform: translate(-50%, -50%); + border: 1px solid rgb(24, 160, 191); + border-image: none; + box-shadow: 0 0 14px 6px rgba(0,0,0,0.16); + text-transform: none; +} + +.dlgContainer.dlgContainer-phone { + padding: 0 5%; +} |
