From ef4f212fc1482136dba1e690ec589b315b4a377f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 8 Nov 2016 12:37:03 -0500 Subject: build 0.7.0 --- .../plugins/cordova-plugin-dialogs/CONTRIBUTING.md | 2 +- StoneIsland/plugins/cordova-plugin-dialogs/LICENSE | 0 StoneIsland/plugins/cordova-plugin-dialogs/NOTICE | 0 .../plugins/cordova-plugin-dialogs/README.md | 17 +- .../plugins/cordova-plugin-dialogs/RELEASENOTES.md | 221 ++++++++++++--------- .../cordova-plugin-dialogs/doc/de/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/de/index.md | 0 .../cordova-plugin-dialogs/doc/es/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/es/index.md | 0 .../cordova-plugin-dialogs/doc/fr/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/fr/index.md | 0 .../cordova-plugin-dialogs/doc/it/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/it/index.md | 0 .../cordova-plugin-dialogs/doc/ja/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/ja/index.md | 0 .../cordova-plugin-dialogs/doc/ko/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/ko/index.md | 0 .../cordova-plugin-dialogs/doc/pl/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/pl/index.md | 0 .../plugins/cordova-plugin-dialogs/doc/ru/index.md | 0 .../cordova-plugin-dialogs/doc/zh/README.md | 0 .../plugins/cordova-plugin-dialogs/doc/zh/index.md | 0 .../plugins/cordova-plugin-dialogs/package.json | 18 +- .../plugins/cordova-plugin-dialogs/plugin.xml | 24 ++- .../src/android/Notification.java | 50 ++++- .../src/blackberry10/index.js | 2 + .../src/firefoxos/notification.js | 9 +- .../src/ios/CDVNotification.bundle/beep.wav | Bin .../src/ios/CDVNotification.h | 0 .../src/ios/CDVNotification.m | 95 ++++++--- .../src/ubuntu/notification.cpp | 0 .../src/ubuntu/notification.h | 0 .../src/ubuntu/notification.qml | 0 .../src/windows/NotificationProxy.js | 94 +++++---- .../cordova-plugin-dialogs/src/wp/Notification.cs | 0 .../src/wp/NotificationBox.xaml | 0 .../src/wp/NotificationBox.xaml.cs | 0 .../src/wp/notification-beep.wav | Bin .../cordova-plugin-dialogs/tests/plugin.xml | 2 +- .../plugins/cordova-plugin-dialogs/tests/tests.js | 61 +++++- .../www/android/notification.js | 0 .../www/blackberry10/beep.js | 32 +-- .../www/blackberry10/notification-beep.wav | Bin .../www/browser/notification.js | 30 +-- .../www/firefoxos/danger-press.png | Bin .../www/firefoxos/danger.png | Bin .../www/firefoxos/default.png | Bin .../www/firefoxos/gradient.png | Bin .../www/firefoxos/notification.css | 0 .../www/firefoxos/pattern.png | Bin .../www/firefoxos/recommend.png | Bin .../cordova-plugin-dialogs/www/notification.js | 62 ++++-- .../www/windows/notification.css | 84 ++++++++ 53 files changed, 541 insertions(+), 262 deletions(-) mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/LICENSE mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/NOTICE mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/RELEASENOTES.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/de/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/package.json mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/blackberry10/index.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/firefoxos/notification.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.bundle/beep.wav mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.cpp mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/wp/Notification.cs mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/android/notification.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/notification-beep.wav mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger-press.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png mode change 100755 => 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js create mode 100644 StoneIsland/plugins/cordova-plugin-dialogs/www/windows/notification.css (limited to 'StoneIsland/plugins/cordova-plugin-dialogs') diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md b/StoneIsland/plugins/cordova-plugin-dialogs/CONTRIBUTING.md old mode 100755 new mode 100644 index f7dbcaba..4c8e6a5e --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE b/StoneIsland/plugins/cordova-plugin-dialogs/NOTICE old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/README.md old mode 100755 new mode 100644 index b16b9f9a..ea2b9311 --- 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 +--- -# cordova-plugin-dialogs +|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI | +|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-dialogs)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-dialogs/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-dialogs)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-dialogs/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?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-store,PLUGIN=cordova-plugin-dialogs/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?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-8.1-phone,PLUGIN=cordova-plugin-dialogs/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-dialogs)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-dialogs/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-dialogs.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-dialogs)| -[![Build Status](https://travis-ci.org/apache/cordova-plugin-dialogs.svg)](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 old mode 100755 new mode 100644 index 79571543..2b34048b --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/de/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/es/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/fr/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/it/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ja/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ko/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/pl/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/ru/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/README.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md b/StoneIsland/plugins/cordova-plugin-dialogs/doc/zh/index.md old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/package.json b/StoneIsland/plugins/cordova-plugin-dialogs/package.json old mode 100755 new mode 100644 index 3fd10da8..f85f14ce --- 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 old mode 100755 new mode 100644 index 6d6235fa..1069cce1 --- a/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/plugin.xml @@ -20,7 +20,7 @@ + version="1.3.0"> Notification Cordova Notification Plugin @@ -41,13 +41,13 @@ - - - - - - - + + + + + + + @@ -110,9 +110,9 @@ - - - + + + @@ -167,5 +167,7 @@ + + diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java b/StoneIsland/plugins/cordova-plugin-dialogs/src/android/Notification.java old mode 100755 new mode 100644 index 3bc3cee6..f19bc888 --- 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 old mode 100755 new mode 100644 index 3660f667..4969a770 --- 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 old mode 100755 new mode 100644 index b6986fd0..aea562d0 --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.h old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m b/StoneIsland/plugins/cordova-plugin-dialogs/src/ios/CDVNotification.m old mode 100755 new mode 100644 index 1581ad3c..0dd3d2cb --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.h old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml b/StoneIsland/plugins/cordova-plugin-dialogs/src/ubuntu/notification.qml old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js b/StoneIsland/plugins/cordova-plugin-dialogs/src/windows/NotificationProxy.js old mode 100755 new mode 100644 index d1eb3448..2d32f836 --- 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"; - - if (isPhone) { - dlg.style.padding = "0px 5%"; - } else { - dlg.style.top = "50%"; // center vertically - dlg.style.transform = "translateY(-50%)"; - dlg.style.padding = "0px 30%"; + dlg.className = "dlgContainer"; + + if (isWindows) { + dlg.className += " dlgContainer-windows"; + } else if (isPhone) { + dlg.className += " dlgContainer-phone"; } + // dialog layout template - dlg.innerHTML = _cleanHtml("
" // title - + "
" // message - + "
"); // input fields + dlg.innerHTML = _cleanHtml("
" + // title + "
" + // message + "
"); // 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/NotificationBox.xaml.cs old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav b/StoneIsland/plugins/cordova-plugin-dialogs/src/wp/notification-beep.wav old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml b/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml old mode 100755 new mode 100644 index f021ddd5..55675b20 --- a/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml +++ b/StoneIsland/plugins/cordova-plugin-dialogs/tests/plugin.xml @@ -20,7 +20,7 @@ + version="1.3.0"> Cordova Notification Plugin Tests Apache 2.0 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js b/StoneIsland/plugins/cordova-plugin-dialogs/tests/tests.js old mode 100755 new mode 100644 index 16e9cd99..7056c0db --- 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) { '

' + '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.' + '

' + - '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.' + '

' + '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.' + '

' + '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.' + '

' + - '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.' + + '

CB-8947 Tests

' + + 'Expected results: Dialogs will not crash iOS'; contentEl.innerHTML = '
' + 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/blackberry10/beep.js old mode 100755 new mode 100644 index 401049e8..da2e75d1 --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/browser/notification.js old mode 100755 new mode 100644 index e8753093..1fdfafd7 --- 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 old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/danger.png old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/default.png old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/gradient.png old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/notification.css old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/pattern.png old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png b/StoneIsland/plugins/cordova-plugin-dialogs/www/firefoxos/recommend.png old mode 100755 new mode 100644 diff --git a/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js b/StoneIsland/plugins/cordova-plugin-dialogs/www/notification.js old mode 100755 new mode 100644 index c3f70d07..4db8f0f2 --- 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") { - - 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]); + _buttonLabels = convertButtonLabels(_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%; +} -- cgit v1.2.3-70-g09d2