# HG changeset patch # User Michael Schloh von Bennewitz # Date 1433422233 -7200 # Node ID e8ccd40d0ef6f5bcc16d74b3cd3105194cc7b6d1 Genesis of lecture sources for Droidcon Berlin 2015 in Postbahnhof. diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/.gitignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/.gitignore Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,1 @@ +.DS_Store diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,64 @@ +Touch Notifier Companion App +============================ +The Touch Notifier Companion App is a simple app that receives data wirelessly and notifies a user if the Touch Sensor (https://software.intel.com/en-us/iot/sensor/grove-buzzer) is being touched. The Touch Notifier node.js/IoT project sends this data to a connected client when running on a IoT platform such as a development board with the sensor connected. This sensor is included in the Grove Starter Kit Plus - Intel® IoT Edition. For more information, go to https://software.intel.com/en-us/iot/devkit. + +Intel(R) XDK +------------------------------------------- +This sample is part of the Intel(R) XDK IoT Edition. +Download the Intel(R) XDK IoT Edition at https://software.intel.com/en-us/html5/xdk-iot. To see the technical details of the sample, +please visit the sample article page at http://software.intel.com/en-us/html5/articles/iot-touch-notifier-nodejs-&-companion. + + +Important App Files +--------------------------- +* index.html +* icon.png +* screenshot.png +* app.json +* README.md +* js/* +* app_framework/* +* css/* +* jquery/* + +License Information Follows +--------------------------- +Copyright (c) 2014, Intel Corporation. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +- Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +App Framework +----------------------------------------------------------------------------- +http://app-framework-software.intel.com/ +source: https://github.com/01org/appframework +license: https://raw.githubusercontent.com/01org/appframework/master/license.txt + +jQuery +----------------------------------------------------------------------------- +http://jquery.com/ +source: https://github.com/jquery/jquery +license: https://raw.githubusercontent.com/jquery/jquery/master/LICENSE.txt diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/Touchgui.xdk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/Touchgui.xdk Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ +{ + "project": { + "projectSettingsVersion": "1.2", + "creationData": { + "projectTypeName": "com.intel.xdk.projecttype.jsapp", + "src": "https://edge-intel.s3.amazonaws.com/jsapp/production/release-2015-ww07/sample-iot-companion-touch-notifier/sample.zip", + "projectGuid": "dfa70862-2c48-4649-b181-373add78f975", + "lastModifiedDate": 1429384906298, + "creationDate": 1425145486141 + }, + "sourceDirectory": "www", + "cordovaPluginsDirectory": "plugins", + "startFile": "index.html", + "projectFiles": {}, + "projectDirectories": {}, + "libraries": [], + "cordovaPlugins": [ + { + "id": "org.apache.cordova.device", + "version": "0.2.13", + "selectedState": "Included", + "data": {}, + "paramvals": {}, + "dependsOn": [], + "dependedBy": [] + }, + { + "id": "org.apache.cordova.splashscreen", + "version": "0.3.5", + "selectedState": "Included", + "data": {}, + "paramvals": {}, + "dependsOn": [], + "dependedBy": [] + }, + { + "id": "org.apache.cordova.vibration", + "version": "0.3.12", + "selectedState": "Included", + "data": {}, + "paramvals": {}, + "dependsOn": [], + "dependedBy": [] + }, + { + "id": "org.apache.cordova.dialogs", + "version": "0.2.11", + "selectedState": "Included", + "data": {}, + "paramvals": {}, + "dependsOn": [], + "dependedBy": [] + } + ], + "serviceMethods": [], + "buildConfigurations": { + "Android": { + "platform_": "android", + "runtime_": "Cordova 3.x", + "name_": "Android", + "preferences_": { + "android-minSdkVersion": "10", + "android-targetSdkVersion": "19", + "android-installLocation": "auto" + }, + "isActive_": true, + "appName_": "Touchgui", + "appID_": "demo.touchnotifier", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "iosProvs_": [], + "cordovaCLIVersion_": "4.1.2", + "crosswalkVersion_": "10", + "appVersion_": "1.0.0", + "appVersionCode_": "1", + "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.", + "appAuthor_": "Intel XDK" + }, + "Android-Crosswalk": { + "platform_": "android", + "runtime_": "Crosswalk with Cordova 3.x", + "name_": "Android-Crosswalk", + "preferences_": { + "android-minSdkVersion": "14", + "android-targetSdkVersion": "19", + "android-installLocation": "auto" + }, + "isActive_": true, + "appName_": "Touchgui", + "appID_": "demo.touchnotifier", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "iosProvs_": [], + "cordovaCLIVersion_": "4.1.2", + "crosswalkVersion_": "10", + "appVersion_": "1.0.0", + "appVersionCode_": "1", + "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.", + "appAuthor_": "Intel XDK" + }, + "iOS": { + "platform_": "ios", + "runtime_": "Cordova 3.x", + "name_": "iOS", + "preferences_": { + "ios-target": "6", + "ios-configuration": "adhoc" + }, + "isActive_": true, + "appName_": "Touchgui", + "appID_": "demo.touchnotifier", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "iosProvs_": [], + "cordovaCLIVersion_": "4.1.2", + "crosswalkVersion_": "10", + "appVersion_": "1.0.0", + "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.", + "appAuthor_": "Intel XDK" + }, + "Windows8": { + "platform_": "windows8", + "runtime_": "Cordova 3.x", + "name_": "Windows8", + "preferences_": {}, + "isActive_": true, + "appName_": "Touchgui", + "appID_": "demo.touchnotifier", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "iosProvs_": [], + "cordovaCLIVersion_": "4.1.2", + "crosswalkVersion_": "10", + "appVersion_": "1.0.0.0", + "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.", + "appAuthor_": "Intel XDK" + }, + "WebApp": { + "platform_": "webapp", + "runtime_": "W3C", + "name_": "WebApp", + "preferences_": {}, + "isActive_": false, + "appName_": "Touchgui", + "appID_": "not.yet.specified", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "appVersion_": "0.0.1" + }, + "Firefox": { + "platform_": "firefoxos", + "runtime_": "W3C on Firefox OS", + "name_": "Firefox", + "preferences_": {}, + "isActive_": false, + "appName_": "Touchgui", + "appID_": "not.yet.specified", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "appVersion_": "0.0.1" + }, + "Chrome": { + "platform_": "chromeos", + "runtime_": "W3C on Chrome OS", + "name_": "Chrome", + "preferences_": {}, + "isActive_": false, + "appName_": "Touchgui", + "appID_": "not.yet.specified", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "appVersion_": "0.0.1" + }, + "Facebook": { + "platform_": "facebook", + "runtime_": "W3C on Facebook", + "name_": "Facebook", + "preferences_": {}, + "isActive_": false, + "appName_": "Touchgui", + "appID_": "not.yet.specified", + "appAccess_": [ + { + "origin": "*" + } + ], + "icons_": [], + "splashes_": [], + "addlPermissions_": "", + "excludedLibraries_": "", + "appVersion_": "0.0.1" + } + }, + "gameAssetDirectory": "asset", + "gameMetadata": {}, + "projectTags": [] + } +} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/Touchgui.xdke --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/Touchgui.xdke Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,9 @@ +{ + "project": { + "projectSettingsVersion": "1.2", + "currentBuildConfiguration": "Android", + "projectFiles": {}, + "projectDirectories": {}, + "initialAutoPluginCount": 0 + } +} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/icon.png Binary file Touchgui/icon.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.android.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/intelxdk.config.android.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,19 @@ + + + + + + +Touchgui +A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched. +Intel XDK + + + + + + + + + + \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.crosswalk.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/intelxdk.config.crosswalk.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,20 @@ + + + + + + +Touchgui +A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched. +Intel XDK + + + + + + + + + + + \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.ios.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/intelxdk.config.ios.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,18 @@ + + + + + + +Touchgui +A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched. +Intel XDK + + + + + + + + + \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.windows8.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/intelxdk.config.windows8.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,16 @@ + + + + + + +Touchgui +A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched. +Intel XDK + + + + + + + \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/.fetch.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/.fetch.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,1 @@ +{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.device"}} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/CONTRIBUTING.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +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). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/LICENSE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/NOTICE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/NOTICE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,22 @@ + + +# org.apache.cordova.device + +Plugin documentation: [doc/index.md](doc/index.md) diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/RELEASENOTES.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,92 @@ + +# Release Notes + +### 0.2.1 (Sept 5, 2013) +* removed extraneous print statement +* [CB-4432] copyright notice change + +### 0.2.3 (Sept 25, 2013) +* CB-4889 bumping&resetting version +* [windows8] commandProxy has moved +* [BlackBerry10] removed uneeded permission tags in plugin.xml +* CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device +* Rename CHANGELOG.md -> RELEASENOTES.md +* updated to use commandProxy for ffos +* add firefoxos support +* [CB-4752] Incremented plugin version on dev branch. + +### 0.2.4 (Oct 28, 2013) +* CB-5128: added repo + issue tag in plugin.xml for device plugin +* CB-5085 device.cordova returning wrong value +* [CB-4915] Incremented plugin version on dev branch. + +### 0.2.5 (Dec 4, 2013) +* CB-5316 Spell Cordova as a brand unless it's a command or script +* [ubuntu] use cordova/exec/proxy +* add ubuntu platform +* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices +* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos' + +### 0.2.6 (Jan 02, 2014) +* CB-5658 Add doc/index.md for Device plugin +* CB-5504 Moving Telephony Logic out of Device + +### 0.2.7 (Jan 07, 2014) +* CB-5737 Fix exception on close caused by left over telephony code from CB-5504 + +### 0.2.8 (Feb 05, 2014) +* Tizen support added + +### 0.2.9 (Apr 17, 2014) +* CB-5105: [Android, windows8, WP, BlackBerry10] Removed dead code for device.version +* CB-6422: [windows8] use cordova/exec/proxy +* CB-6460: Update license headers +* Add NOTICE file + +### 0.2.10 (Jun 05, 2014) +* CB-6127 Spanish and French Translations added. Github close #12 +* Changing 1.5 to 2.0 +* added firefoxos version - conversion +* added firefoxos version +* CB-6800 Add license +* CB-6491 add CONTRIBUTING.md + +### 0.2.11 (Aug 06, 2014) +* [FFOS] update DeviceProxy.js +* CB-6127 Updated translations for docs +* Use Windows system calls to get better info + +### 0.2.12 (Sep 17, 2014) +* CB-7471 cordova-plugin-device documentation translation +* CB-7552 device.name docs have not been removed +* [fxos] Fix cordova version +* added status box and documentation to manual tests +* [fxos] Fix cordova version +* added status box and documentation to manual tests +* Added plugin support for the browser +* CB-7262 Adds support for universal windows apps. + +### 0.2.13 (Dec 02, 2014) +* Changing `device.platform` to always report the platform as "browser". +* CB-5892 - Remove deprecated `window.Settings` +* CB-7700 cordova-plugin-device documentation translation: cordova-plugin-device +* CB-7571 Bump version of nested plugin to match parent plugin diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/de/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add org.apache.cordova.device + + +## Eigenschaften + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Browser +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +## device.model + +Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein. + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model; + + +### Android Eigenarten + +* Ruft den [Produktname][1] anstelle des [Modellnamens][2], das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen Macken + +* Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN` + +### Windows Phone 7 und 8 Eigenarten + +* Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`. + +## device.platform + +Name des Betriebssystems des Geräts zu erhalten. + + var string = device.platform; + + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Macken + +Windows Phone 7 Geräte melden die Plattform als`WinCE`. + +### Windows Phone 8 Macken + +Windows Phone 8 Geräte melden die Plattform als`Win32NT`. + +## device.uuid + +Des Geräts Universally Unique Identifier ([UUID][3] zu erhalten). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Beschreibung + +Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts. + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert. + / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet. + / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy. + var deviceID = device.uuid; + + +### iOS Quirk + +Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert. + +### Windows Phone 7 und 8 Eigenarten + +Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist. + +## device.version + +Version des Betriebssystems zu erhalten. + + var string = device.version; + + +### Unterstützte Plattformen + +* Android 2.1 + +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/es/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,220 @@ + + +# org.apache.cordova.device + +Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalación + + cordova plugin add org.apache.cordova.device + + +## Propiedades + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Obtener la versión de Cordova que se ejecuta en el dispositivo. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Explorador +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +## device.model + +El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto. + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* Explorador +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Rarezas Android + +* Obtiene el [nombre del producto][1] en lugar del [nombre de la modelo][2], que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Rarezas Tizen + +* Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN` + +### Windows Phone 7 y 8 rarezas + +* Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`. + +## device.platform + +Obtener el nombre del sistema operativo del dispositivo. + + var string = device.platform; + + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 rarezas + +Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`. + +### Windows Phone 8 rarezas + +Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`. + +## device.uuid + +Obtener identificador universalmente única del dispositivo ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Descripción + +Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son específicos a la plataforma del dispositivo o modelo. + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: devuelve un entero de 64 bits al azar (como una cadena, otra vez!) + // el entero es generado en el primer arranque del dispositivo + // + // BlackBerry: devuelve el número PIN del dispositivo + // este es un entero único de nueve dígitos (como una cadena, aunque!) + // + // iPhone: (parafraseado de la documentación de la clase UIDevice) + // devuelve una cadena de valores hash creado a partir + // de múltiples hardware identifica. + / / Está garantizado para ser único para cada dispositivo y no puede ser atado / / a la cuenta de usuario. + // Windows Phone 7: devuelve un hash de dispositivo + usuario actual, + // si el usuario no está definido, un guid generado y persistirá hasta que se desinstala la aplicación + // + // Tizen: devuelve el dispositivo IMEI (identidad de equipo móvil internacional o IMEI es un número + // único para cada teléfono móvil GSM y UMTS. + var deviceID = device.uuid; + + +### iOS chanfle + +El `uuid` en iOS no es exclusiva de un dispositivo, pero varía para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable. + +### Windows Phone 7 y 8 rarezas + +El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo. + +## device.version + +Obtener la versión del sistema operativo. + + var string = device.version; + + +### Plataformas soportadas + +* Android 2.1 + +* BlackBerry 10 +* Explorador +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. el Mango se vuelve 7.10.7720 + // Tizen: devuelve "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/fr/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,218 @@ + + +# org.apache.cordova.device + +Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add org.apache.cordova.device + + +## Propriétés + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Retourne la version de Cordova en cours d'exécution sur l'appareil. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Navigateur +* Firefox OS +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## device.model + +L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit. + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* Navigateur +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Quirks Android + +* Retourne le [nom du produit][1] au lieu du [nom du modèle][2], ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Bizarreries de paciarelli + +* Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN` + +### Windows Phone 7 et 8 Quirks + +* Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus. + +## device.platform + +Obtenir le nom de système d'exploitation de l'appareil. + + var string = device.platform; + + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Quirks + +Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`. + +### Notes au sujet de Windows Phone 8 + +Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`. + +## device.uuid + +Obtenir Universally Unique Identifier de l'appareil ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Description + +Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil. + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !) + // Ce nombre entier est généré lors du premier démarrage de l'appareil + // + // BlackBerry : retourne le numéro PIN de l'appareil + // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !) + // + // iPhone : (copié depuis la documentation de la classe UIDevice) + // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles. + / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur. + // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel, + // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée + // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est + // unique pour chaque téléphone GSM et UMTS. + var deviceID = device.uuid; + + +### Spécificités iOS + +Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable. + +### Windows Phone 7 et 8 Quirks + +Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique. + +## device.version + +Téléchargez la version de système d'exploitation. + + var string = device.version; + + +### Plates-formes prises en charge + +* Android 2.1+ +* BlackBerry 10 +* Navigateur +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,218 @@ + + +# org.apache.cordova.device + +This plugin defines a global `device` object, which describes the device's hardware and software. +Although the object is in the global scope, it is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + +## Installation + + cordova plugin add org.apache.cordova.device + +## Properties + +- device.cordova +- device.model +- device.platform +- device.uuid +- device.version + +## device.cordova + +Get the version of Cordova running on the device. + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- Browser +- Firefox OS +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +## device.model + +The `device.model` returns the name of the device's model or +product. The value is set by the device manufacturer and may be +different across versions of the same product. + +### Supported Platforms + +- Android +- BlackBerry 10 +- Browser +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +### Quick Example + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + +### Android Quirks + +- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`. + +### Tizen Quirks + +- Returns the device model assigned by the vendor, for example, `TIZEN` + +### Windows Phone 7 and 8 Quirks + +- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`. + +## device.platform + +Get the device's operating system name. + + var string = device.platform; + +### Supported Platforms + +- Android +- BlackBerry 10 +- Browser4 +- Firefox OS +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +### Quick Example + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + +### Windows Phone 7 Quirks + +Windows Phone 7 devices report the platform as `WinCE`. + +### Windows Phone 8 Quirks + +Windows Phone 8 devices report the platform as `Win32NT`. + +## device.uuid + +Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + +### Description + +The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model. + +### Supported Platforms + +- Android +- BlackBerry 10 +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +### Quick Example + + // Android: Returns a random 64-bit integer (as a string, again!) + // The integer is generated on the device's first boot + // + // BlackBerry: Returns the PIN number of the device + // This is a nine-digit unique integer (as a string, though!) + // + // iPhone: (Paraphrased from the UIDevice Class documentation) + // Returns a string of hash values created from multiple hardware identifies. + // It is guaranteed to be unique for every device and can't be tied + // to the user account. + // Windows Phone 7 : Returns a hash of device+current user, + // if the user is not defined, a guid is generated and will persist until the app is uninstalled + // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number + // unique to every GSM and UMTS mobile phone. + var deviceID = device.uuid; + +### iOS Quirk + +The `uuid` on iOS is not unique to a device, but varies for each +application, for each installation. It changes if you delete and +re-install the app, and possibly also when you upgrade iOS, or even +upgrade the app per version (apparent in iOS 5.1). The `uuid` is not +a reliable value. + +### Windows Phone 7 and 8 Quirks + +The `uuid` for Windows Phone 7 requires the permission +`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this +property soon. If the capability is not available, the application +generates a persistent guid that is maintained for the duration of the +application's installation on the device. + +## device.version + +Get the operating system version. + + var string = device.version; + +### Supported Platforms + +- Android 2.1+ +- BlackBerry 10 +- Browser +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +### Quick Example + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/it/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installazione + + cordova plugin add org.apache.cordova.device + + +## Proprietà + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Ottenere la versione di Cordova in esecuzione nel dispositivo. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Browser +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +## device.model + +Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto. + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model; + + +### Stranezze Android + +* Ottiene il [nome del prodotto][1] anziché il [nome del modello][2], che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen stranezze + +* Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN` + +### Windows Phone 7 e 8 stranezze + +* Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`. + +## device.platform + +Ottenere il nome del sistema operativo del dispositivo. + + var string = device.platform; + + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 capricci + +Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`. + +### Windows Phone 8 stranezze + +Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`. + +## device.uuid + +Ottenere identificatore del dispositivo univoco universale ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Descrizione + +I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo. + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica. + / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente. + / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS. + var deviceID = device.uuid; + + +### iOS Quirk + +Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile. + +### Windows Phone 7 e 8 stranezze + +Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà. Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo. + +## device.version + +Ottenere la versione del sistema operativo. + + var string = device.version; + + +### Piattaforme supportate + +* Android 2.1 + +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ja/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +このプラグインをグローバル定義します `device` オブジェクトは、デバイスのハードウェアとソフトウェアについて説明します。 それは後まで利用可能なオブジェクトがグローバル スコープでは、 `deviceready` イベント。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## インストール + + cordova plugin add org.apache.cordova.device + + +## プロパティ + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +デバイスで実行されているコルドバのバージョンを取得します。 + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* ブラウザー +* Firefox の OS +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +## device.model + +`device.model`、デバイスのモデルまたは製品の名前を返します。値は、デバイスの製造元によって設定され、同じ製品のバージョン間で異なる可能性があります。 + +### サポートされているプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* ブラウザー +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### 簡単な例 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models を参照してください//var モデル = device.model; + + +### Android の癖 + +* 生産コード名は[モデル名][1]の代わりに[製品名][2]を取得します。 たとえば、ネクサス 1 つを返します `Passion` 、Motorola のドロイドを返します`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#MODEL + [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + +### Tizen の癖 + +* たとえば、ベンダーによって割り当てられているデバイスのモデルを返します`TIZEN` + +### Windows Phone 7 と 8 癖 + +* 製造元によって指定されたデバイスのモデルを返します。たとえば、三星フォーカスを返します`SGH-i917`. + +## device.platform + +デバイスのオペレーティング システム名を取得します。 + + var string = device.platform; + + +### サポートされているプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* Browser4 +* Firefox の OS +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### 簡単な例 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 の癖 + +Windows Phone 7 デバイスとプラットフォームを報告します。`WinCE`. + +### Windows Phone 8 癖 + +Windows Phone 8 デバイスとプラットフォームを報告します。`Win32NT`. + +## device.uuid + +デバイスのユニバーサル ・ ユニーク識別子 ([UUID][3]を取得します。). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 説明 + +UUID を生成する方法の詳細は、デバイスの製造元によって決定され、デバイスのプラットフォームやモデルに固有です。 + +### サポートされているプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### 簡単な例 + + //アンドロイド: ランダムな 64 ビットの整数 (を文字列として返します、再び !)/デバイスの最初の起動時に生成される整数/////ブラックベリー: デバイスのピン番号を返します//これは 9 桁の一意な整数 (を文字列としても !)////iPhone: (UIDevice クラスのドキュメントから言い換え)//識別複数のハードウェアから作成されたハッシュ値の文字列を返します。。 + //それはすべてのデバイスに対して一意であることが保証され、接続することはできません//ユーザー アカウント。 + //Windows Phone 7: デバイス + 現在のユーザーのハッシュを返します//ユーザーが定義されていない場合 guid が生成され、アプリがアンインストールされるまで保持されます//Tizen: デバイスの IMEI を返します (国際モバイル機器アイデンティティまたは IMEI は番号です//すべての GSM および UMTS の携帯電話に固有です。 + var deviceID = device.uuid; + + +### iOS の気まぐれ + +`uuid`IOS で、デバイスに固有ではないインストールごと、アプリケーションごとに異なります。 削除、アプリを再インストールした場合に変更と多分またときアップグレード iOS の, またはもアップグレードするアプリ (iOS の 5.1 で明らかに) バージョンごと。 `uuid`は信頼性の高い値ではありません。 + +### Windows Phone 7 と 8 癖 + +`uuid`のために Windows Phone 7 には、権限が必要です `ID_CAP_IDENTITY_DEVICE` 。 Microsoft はすぐにこのプロパティを廃止して可能性があります。 機能が利用できない場合、アプリケーションはデバイスへのアプリケーションのインストールの持続期間のために保持されている永続的な guid を生成します。 + +## device.version + +オペレーティング システムのバージョンを取得します。 + + var string = device.version; + + +### サポートされているプラットフォーム + +* アンドロイド 2.1 + +* ブラックベリー 10 +* ブラウザー +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### 簡単な例 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ko/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +이 플러그인 정의 전역 `device` 개체, 디바이스의 하드웨어 및 소프트웨어에 설명 합니다. 개체는 전역 범위에서 비록 그것은 후까지 사용할 수 있는 `deviceready` 이벤트. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## 설치 + + cordova plugin add org.apache.cordova.device + + +## 속성 + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +코르도바는 장치에서 실행 중인 버전을 얻을. + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* 브라우저 +* Firefox 운영 체제 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +## device.model + +`device.model`소자의 모델 또는 제품의 이름을 반환 합니다. 값 장치 제조업체에서 설정 되 고 동일 제품의 버전 간에 다를 수 있습니다. + +### 지원 되는 플랫폼 + +* 안 드 로이드 +* 블랙베리 10 +* 브라우저 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### 빠른 예제 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var 모델 = device.model; + + +### 안 드 로이드 단점 + +* 어떤은 종종 프로덕션 코드 이름 대신 [제품 모델 이름][1], [제품 이름][2] 을 가져옵니다. 예를 들어 넥서스 하나 반환 합니다 `Passion` , 모토로라 Droid를 반환 합니다`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#MODEL + [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + +### Tizen 특수 + +* 예를 들어, 공급 업체에 의해 할당 된 디바이스 모델을 반환 합니다.`TIZEN` + +### Windows Phone 7, 8 특수 + +* 제조업체에서 지정 하는 장치 모델을 반환 합니다. 예를 들어 삼성 포커스를 반환 합니다.`SGH-i917`. + +## device.platform + +장치의 운영 체제 이름을 얻을. + + var string = device.platform; + + +### 지원 되는 플랫폼 + +* 안 드 로이드 +* 블랙베리 10 +* Browser4 +* Firefox 운영 체제 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### 빠른 예제 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 단점 + +Windows Phone 7 장치 보고 플랫폼으로`WinCE`. + +### Windows Phone 8 단점 + +Windows Phone 8 장치 보고 플랫폼으로`Win32NT`. + +## device.uuid + +소자의 보편적으로 고유 식별자 ([UUID][3] 를 얻을합니다). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 설명 + +UUID 생성 방법의 자세한 내용은 장치 제조업체에 의해 결정 됩니다 및 소자의 플랫폼 이나 모델. + +### 지원 되는 플랫폼 + +* 안 드 로이드 +* 블랙베리 10 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### 빠른 예제 + + / / 안 드 로이드: (문자열로 다시!) 임의의 64 비트 정수를 반환 합니다 / / 정수 장치의 첫 번째 부팅에서 생성 / / / / 블랙베리: 디바이스의 핀 번호를 반환 합니다 / / 이것은 9 자리 고유 정수 (문자열로 비록!) / / / / 아이폰: (UIDevice 클래스 설명서에서 읊 었) / / 문자열 여러 하드웨어에서 생성 하는 해시 값을 식별 하는 반환 합니다. + / 그것은 모든 장치에 대 한 고유 해야 보장 되 고 묶일 수 없습니다 / / / 사용자 계정에. + / / Windows Phone 7: 장치 + 현재 사용자의 해시를 반환 합니다 / / 사용자 정의 되지 않은 경우 guid 생성 되 고 응용 프로그램을 제거할 때까지 유지 됩니다 / / Tizen: 반환 장치 IMEI (국제 모바일 기기 식별 또는 IMEI 숫자입니다 / / 모든 GSM와 UMTS 휴대 전화 고유. + var deviceID = device.uuid; + + +### iOS 특질 + +`uuid`ios 장치에 고유 하지 않습니다 하지만 각 설치에 대 한 응용 프로그램 마다 다릅니다. 삭제 하 고 다시 애플 리 케이 션을 설치 하는 경우 변경 가능 하 게 또한 iOS를 업그레이드 하거나 때 버전 (iOS 5.1에에서 명백한) 당 응용 프로그램 업그레이드도 하 고. `uuid`은 신뢰할 수 있는 값이 아닙니다. + +### Windows Phone 7, 8 특수 + +`uuid`Windows Phone 7 필요 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 곧이 속성을 세웁니다 가능성이 것입니다. 기능을 사용할 수 없는 경우 응용 프로그램 장치에 응용 프로그램의 설치 하는 동안 유지 하는 영구 guid를 생성 합니다. + +## device.version + +운영 체제 버전을 얻을. + + var string = device.version; + + +### 지원 되는 플랫폼 + +* 안 드 로이드 2.1 + +* 블랙베리 10 +* 브라우저 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### 빠른 예제 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/pl/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +Ten plugin określa globalne `device` obiekt, który opisuje urządzenia sprzętowe i programowe. Mimo, że obiekt jest w globalnym zasięgu, nie jest dostępne dopiero po `deviceready` zdarzenie. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalacja + + cordova plugin add org.apache.cordova.device + + +## Właściwości + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Pobierz wersję Cordova działa na urządzeniu. + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Przeglądarka +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +## device.model + +`device.model`Zwraca nazwę modelu lub produktu. Wartość jest zestaw przez producenta urządzenia i mogą się różnić między wersjami tego samego produktu. + +### Obsługiwane platformy + +* Android +* BlackBerry 10 +* Przeglądarka +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykład + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model; + + +### Dziwactwa Androida + +* Pobiera [nazwę produktu][1] zamiast [nazwy modelu][2], który często jest nazwą kod produkcji. Na przykład, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Dziwactwa Tizen + +* Zwraca modelu urządzenia przypisane przez dostawcę, na przykład,`TIZEN` + +### Windows Phone 7 i 8 dziwactwa + +* Zwraca modelu urządzenia, określonej przez producenta. Na przykład Samsung ostrości zwraca`SGH-i917`. + +## device.platform + +Uzyskać nazwę systemu operacyjnego urządzenia. + + var string = device.platform; + + +### Obsługiwane platformy + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykład + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Dziwactwa Windows Phone 7 + +Urządzenia Windows Phone 7 raport platformy jako`WinCE`. + +### Windows Phone 8 dziwactwa + +Urządzenia Windows Phone 8 raport platformy jako`Win32NT`. + +## device.uuid + +Się urządzenia uniwersalnie unikatowy identyfikator ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Opis + +Szczegóły jak UUID jest generowane są określane przez producenta urządzenia i są specyficzne dla platformy lub modelu urządzenia. + +### Obsługiwane platformy + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykład + + / / Android: zwraca losowe 64-bitowa liczba całkowita (jako ciąg, znowu!) / / liczba całkowita jest generowany na pierwszego uruchomienia urządzenia / / / / BlackBerry: zwraca numer PIN urządzenia / / to jest unikatową liczbą całkowitą dziewięciu cyfr (jako ciąg, choć!) / / / / iPhone: (zacytowana w dokumentacji klasy UIDevice) / / zwraca ciąg wartości mieszania utworzone z wielu sprzętu identyfikuje. + Zapewniona jest unikatowy dla każdego urządzenia i nie może być związane z / do konta użytkownika. + / / Windows Phone 7: zwraca wartość mieszania urządzenia + bieżący użytkownik, / / jeśli nie zdefiniowane przez użytkownika, identyfikator guid jest generowany i będzie trwać do czasu odinstalowania aplikacji / / Tizen: zwraca urządzenia IMEI (International Mobile Equipment Identity lub IMEI jest liczbą / / unikatowe dla każdego telefonu komórkowego GSM i UMTS. + var deviceID = device.uuid; + + +### iOS dziwactwo + +`uuid`Na iOS nie jest przypisany do urządzenia, ale różni się dla każdej aplikacji, dla każdej instalacji. Zmienia się jeśli możesz usunąć i ponownie zainstalować aplikację, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartości. + +### Windows Phone 7 i 8 dziwactwa + +`uuid`Dla Windows Phone 7 wymaga uprawnień `ID_CAP_IDENTITY_DEVICE` . Microsoft będzie prawdopodobnie potępiać ten wkrótce. Jeśli funkcja nie jest dostępna, aplikacja generuje trwałe identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urządzeniu. + +## device.version + +Pobierz wersję systemu operacyjnego. + + var string = device.version; + + +### Obsługiwane platformy + +* Android 2.1 + +* BlackBerry 10 +* Przeglądarka +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykład + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ru/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,219 @@ + + +# org.apache.cordova.device + +Этот плагин определяет глобальный объект `device`, который описывает оборудование и программное обеспечение устройства. Несмотря на то что объект в глобальной области видимости, он не доступен до того момента пока не произойдет событие `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Установка + + cordova plugin add org.apache.cordova.device + + +## Параметры + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Возвращает версию Cordova, работающую на устройстве. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Обозреватель +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +## device.model + +Свойство `device.model` возвращает имя устройства модели или продукта. Значение устанавливается производителем устройства и могут отличаться в разных версиях одного и того же продукта. + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* Обозреватель +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Особенности Android + +* Возвращает [имя продукта][1] , а не [имя модели][2], которое часто является производственным кодом. Например, Nexus One из них возвращает `Passion` , и Motorola Droid возвращает `voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Особенности Tizen + +* Возвращает модель устройства, назначенного вендором, например,`TIZEN` + +### Особенности Windows Phone 7 и 8 + +* Возвращает модель устройства, указанной заводом-изготовителем. Например Samsung Focus возвращает `SGH-i917`. + +## device.platform + +Получите имя операционной системы устройства. + + var string = device.platform; + + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* Браузером4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Особенности Windows Phone 7 + +Windows Phone 7 устройства сообщают платформу как `WinCE`. + +### Особенности Windows Phone 8 + +Устройства Windows Phone 8 сообщают платформу как `Win32NT`. + +## device.uuid + +Возвращает универсальный уникального идентификатора ([UUID][3] устройства). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Описание + +Подробная информация о том как UUID генерируется, определяются изготовителем устройства и являются специфическими для платформы или модели устройства. + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Возвращает случайное 64-разрядное целое число (в виде строки, опять!) + // целое число генерируется при первой загрузке устройства + // + // BlackBerry: Возвращает номер PIN устройства + // это 9 значный уникальный целочисленный (как строка, хотя!) + // + // iPhone: (Перефразировано из документации класса UIDevice) + // возвращает строку хэш-значения, созданные из нескольких аппаратных определяет. + // Это значение гарантированно является уникальным для каждого устройства и не может быть привязано + // к учетной записи пользователя. + // Windows Phone 7: Возвращает хэш устройство + текущего пользователя, + // если пользователь не определен, формируется guid который и будет сохраняться до тех пор, пока приложение не удалиться + // Tizen: возвращает IMEI устройства (Международный идентификатор мобильного оборудования или IMEI это число + // уникальное для каждого мобильного телефона GSM и UMTS. + var deviceID = device.uuid; + + +### Особенности iOS + +На iOS `uuid` не является уникальным для устройства, но варьируется для каждого приложения, и для каждой установки. Значение меняется, если удалить и повторно установить приложение, и возможно также когда вы обновите iOS, или даже обновить приложение до следующей версии (очевидно в iOS 5.1). Значение `uuid` не является надежным. + +### Особенности Windows Phone 7 и 8 + +Для Windows Phone 7 `uuid` требует разрешения `ID_CAP_IDENTITY_DEVICE` . Microsoft скорее всего скоро сделает это свойство устаревшим. Если возможность недоступна, приложение создает постоянные guid, который сохраняется на все время установки приложения на устройстве. + +## device.version + +Возвращает версию операционной системы. + + var string = device.version; + + +### Поддерживаемые платформы + +* Android 2.1 + +* BlackBerry 10 +* Обозреватель +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/zh/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,206 @@ + + +# org.apache.cordova.device + +這個外掛程式定義全球 `device` 物件,描述該設備的硬體和軟體。 雖然物件是在全球範圍內,但不是可用,直到後 `deviceready` 事件。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## 安裝 + + cordova plugin add org.apache.cordova.device + + +## 屬性 + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +獲取科爾多瓦在設備上運行的版本。 + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* 瀏覽器 +* 火狐瀏覽器的作業系統 +* iOS +* 泰 +* Windows Phone 7 和 8 +* Windows 8 + +## device.model + +`device.model`返回設備的模型或產品的名稱。值由設備製造商設置和同一產品的不同版本可能不同。 + +### 支援的平臺 + +* Android 系統 +* 黑莓 10 +* 瀏覽器 +* iOS +* 泰 +* Windows Phone 7 和 8 +* Windows 8 + +### 快速的示例 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. 請參閱 HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ; + + +### Android 的怪癖 + +* 獲取[產品名稱][1]而不是[產品型號名稱][2],這往往是生產代碼名稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen 怪癖 + +* 例如,返回與供應商指派的設備模型`TIZEN` + +### Windows Phone 7 和 8 怪癖 + +* 返回由製造商指定的設備模型。例如,三星焦點返回`SGH-i917`. + +## device.platform + +獲取設備的作業系統名稱。 + + var string = device.platform; + + +### 支援的平臺 + +* Android 系統 +* 黑莓 10 +* Browser4 +* 火狐瀏覽器的作業系統 +* iOS +* 泰 +* Windows Phone 7 和 8 +* Windows 8 + +### 快速的示例 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 的怪癖 + +Windows Phone 7 設備報告作為平臺`WinCE`. + +### Windows Phone 8 怪癖 + +Windows Phone 8 設備報告作為平臺`Win32NT`. + +## device.uuid + +獲取設備的通用唯一識別碼 ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 說明 + +如何生成一個 UUID 的細節由設備製造商和特定于設備的平臺或模型。 + +### 支援的平臺 + +* Android 系統 +* 黑莓 10 +* iOS +* Tizen +* Windows Phone 7 和 8 +* Windows 8 + +### 快速的示例 + + / / Android: 一個隨機的 64 位整數 (作為字串返回,再次!) / / 上設備的第一次啟動生成的整數 / / / / 黑莓手機: 返回設備的 PIN 號碼 / / 這是九個數字的唯一整數 (作為字串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個字串的雜湊值創建的多個硬體標識。 + / / 它保證是唯一的每個設備並不能綁 / / 到使用者帳戶。 + / / Windows Phone 7: 返回的雜湊代碼的設備 + 當前使用者,/ / 如果未定義使用者,則一個 guid 生成的並且將會保留直到卸載該應用程式 / / Tizen: 返回設備 IMEI (國際行動裝置身份或 IMEI 是一個數位 / / 獨有的每一個 UMTS 和 GSM 行動電話。 + var deviceID = device.uuid; + + +### iOS 怪癖 + +`uuid`在 iOS 不是唯一的一種裝置,但對於每個應用程式,為每個安裝而異。 如果您刪除並重新安裝該應用程式,它更改和可能還當你升級 iOS,或甚至升級每個版本 (iOS 5.1 中存在明顯的) 的應用程式。 `uuid`不是一個可靠的值。 + +### Windows Phone 7 和 8 怪癖 + +`uuid`為 Windows Phone 7 須經許可 `ID_CAP_IDENTITY_DEVICE` 。 Microsoft 可能會很快棄用此屬性。 如果沒有可用的能力,應用程式將生成設備上應用程式的安裝過程中保持持續的 guid。 + +## device.version + +獲取作業系統版本。 + + var string = device.version; + + +### 支援的平臺 + +* Android 2.1 + +* 黑莓 10 +* 瀏覽器 +* iOS +* 泰 +* Windows Phone 7 和 8 +* Windows 8 + +### 快速的示例 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,168 @@ + + + + + Device + Cordova Device Plugin + Apache 2.0 + cordova,device + https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git + https://issues.apache.org/jira/browse/CB/component/12320648 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + read_device_identifying_information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/android/Device.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/android/Device.java Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,156 @@ +/* + 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. +*/ +package org.apache.cordova.device; + +import java.util.TimeZone; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaInterface; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.provider.Settings; + +public class Device extends CordovaPlugin { + public static final String TAG = "Device"; + + public static String platform; // Device OS + public static String uuid; // Device UUID + + private static final String ANDROID_PLATFORM = "Android"; + private static final String AMAZON_PLATFORM = "amazon-fireos"; + private static final String AMAZON_DEVICE = "Amazon"; + + /** + * Constructor. + */ + public Device() { + } + + /** + * Sets the context of the Command. This can then be used to do things like + * get file paths associated with the Activity. + * + * @param cordova The context of the main Activity. + * @param webView The CordovaWebView Cordova is running in. + */ + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + Device.uuid = getUuid(); + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext The callback id used when calling back into JavaScript. + * @return True if the action was valid, false if not. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + if (action.equals("getDeviceInfo")) { + JSONObject r = new JSONObject(); + r.put("uuid", Device.uuid); + r.put("version", this.getOSVersion()); + r.put("platform", this.getPlatform()); + r.put("model", this.getModel()); + callbackContext.success(r); + } + else { + return false; + } + return true; + } + + //-------------------------------------------------------------------------- + // LOCAL METHODS + //-------------------------------------------------------------------------- + + /** + * Get the OS name. + * + * @return + */ + public String getPlatform() { + String platform; + if (isAmazonDevice()) { + platform = AMAZON_PLATFORM; + } else { + platform = ANDROID_PLATFORM; + } + return platform; + } + + /** + * Get the device's Universally Unique Identifier (UUID). + * + * @return + */ + public String getUuid() { + String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); + return uuid; + } + + public String getModel() { + String model = android.os.Build.MODEL; + return model; + } + + public String getProductName() { + String productname = android.os.Build.PRODUCT; + return productname; + } + + /** + * Get the OS version. + * + * @return + */ + public String getOSVersion() { + String osversion = android.os.Build.VERSION.RELEASE; + return osversion; + } + + public String getSDKVersion() { + @SuppressWarnings("deprecation") + String sdkversion = android.os.Build.VERSION.SDK; + return sdkversion; + } + + public String getTimeZoneID() { + TimeZone tz = TimeZone.getDefault(); + return (tz.getID()); + } + + /** + * Function to check if the device is manufactured by Amazon + * + * @return + */ + public boolean isAmazonDevice() { + if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) { + return true; + } + return false; + } + +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/blackberry10/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,68 @@ +/* + * + * 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. + * +*/ + +function getModelName () { + var modelName = window.qnx.webplatform.device.modelName; + //Pre 10.2 (meaning Z10 or Q10) + if (typeof modelName === "undefined") { + if (window.screen.height === 720 && window.screen.width === 720) { + if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) { + modelName = "Q10"; + } else { + modelName = "Q5"; + } + } else if ((window.screen.height === 1280 && window.screen.width === 768) || + (window.screen.height === 768 && window.screen.width === 1280)) { + modelName = "Z10"; + } else { + modelName = window.qnx.webplatform.deviceName; + } + } + + return modelName; +} + +function getUUID () { + var uuid = ""; + try { + //Must surround by try catch because this will throw if the app is missing permissions + uuid = window.qnx.webplatform.device.devicePin; + } catch (e) { + //DO Nothing + } + return uuid; +} + +module.exports = { + getDeviceInfo: function (success, fail, args, env) { + var result = new PluginResult(args, env), + modelName = getModelName(), + uuid = getUUID(), + info = { + platform: "blackberry10", + version: window.qnx.webplatform.device.scmBundle, + model: modelName, + uuid: uuid + }; + + result.ok(info); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/browser/DeviceProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/browser/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,78 @@ +/* + * + * 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. + * + */ +var browser = require('cordova/platform'); +var cordova = require('cordova'); + +function getPlatform() { + return "browser"; +} + +function getModel() { + return getBrowserInfo(true); +} + +function getVersion() { + return getBrowserInfo(false); +} + +function getBrowserInfo(getModel) { + var userAgent = navigator.userAgent; + var returnVal; + + if ((offset = userAgent.indexOf('Chrome')) !== -1) { + returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7); + } else if ((offset = userAgent.indexOf('Safari')) !== -1) { + if (getModel) { + returnVal = 'Safari'; + } else { + returnVal = userAgent.substring(offset + 7); + + if ((offset = userAgent.indexOf('Version')) !== -1) { + returnVal = userAgent.substring(offset + 8); + } + } + } else if ((offset = userAgent.indexOf('Firefox')) !== -1) { + returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8); + } + + if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) { + returnVal = returnVal.substring(0, offset); + } + + return returnVal; +} + + +module.exports = { + getDeviceInfo: function (success, error) { + setTimeout(function () { + success({ + cordova: browser.cordovaVersion, + platform: getPlatform(), + model: getModel(), + version: getVersion(), + uuid: null + }); + }, 0); + } +}; + +require("cordova/exec/proxy").add("Device", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,79 @@ +/* + * + * 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. + * + */ +//example UA String for Firefox OS +//Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0 +var firefoxos = require('cordova/platform'); +var cordova = require('cordova'); + +//UA parsing not recommended but currently this is the only way to get the Firefox OS version +//https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference + +//Should be replaced when better conversion to Firefox OS Version is available +function convertVersionNumber(ver) { + var hashVersion = { + '18.0': '1.0.1', + '18.1': '1.1', + '26.0': '1.2', + '28.0': '1.3', + '30.0': '1.4', + '32.0': '2.0' + }; + var rver = ver; + var sStr = ver.substring(0, 4); + if (hashVersion[sStr]) { + rver = hashVersion[sStr]; + } + return (rver); + +} +function getVersion() { + if (navigator.userAgent.match(/(mobile|tablet)/i)) { + var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/)); + if (ffVersionArray.length === 2) { + return (convertVersionNumber(ffVersionArray[1])); + } + } + return (null); +} + +function getModel() { + var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/); + if (navigator.userAgent.match(/(mobile|tablet)/i)) { + if (uaArray.length === 5) { + return (uaArray[2]); + } + } + return (null); +} +module.exports = { + getDeviceInfo: function (success, error) { + setTimeout(function () { + success({ + platform: 'firefoxos', + model: getModel(), + version: getVersion(), + uuid: null + }); + }, 0); + } +}; + +require("cordova/exec/proxy").add("Device", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,30 @@ +/* + 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. + */ + +#import +#import + +@interface CDVDevice : CDVPlugin +{} + ++ (NSString*)cordovaVersion; + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,76 @@ +/* + 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. + */ + +#include +#include + +#import +#import "CDVDevice.h" + +@implementation UIDevice (ModelVersion) + +- (NSString*)modelVersion +{ + size_t size; + + sysctlbyname("hw.machine", NULL, &size, NULL, 0); + char* machine = malloc(size); + sysctlbyname("hw.machine", machine, &size, NULL, 0); + NSString* platform = [NSString stringWithUTF8String:machine]; + free(machine); + + return platform; +} + +@end + +@interface CDVDevice () {} +@end + +@implementation CDVDevice + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command +{ + NSDictionary* deviceProperties = [self deviceProperties]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (NSDictionary*)deviceProperties +{ + UIDevice* device = [UIDevice currentDevice]; + NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; + + [devProps setObject:[device modelVersion] forKey:@"model"]; + [devProps setObject:@"iOS" forKey:@"platform"]; + [devProps setObject:[device systemVersion] forKey:@"version"]; + [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"]; + [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"]; + + NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; + return devReturn; +} + ++ (NSString*)cordovaVersion +{ + return CDV_VERSION; +} + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,39 @@ +/* + * + * 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. + * +*/ + +var tizen = require('cordova/platform'); +var cordova = require('cordova'); + +module.exports = { + getDeviceInfo: function(success, error) { + setTimeout(function () { + success({ + cordova: tizen.cordovaVersion, + platform: 'tizen', + model: null, + version: null, + uuid: null + }); + }, 0); + } +}; + +require("cordova/tizen/commandProxy").add("Device", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,64 @@ +/* + * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ + * + * Licensed 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. + */ + +#include +#include + +#include"device.h" + +#define CORDOVA "3.0.0" + +Device::Device(Cordova *cordova) : CPlugin(cordova) { +} + +static QString getOSName() { +#ifdef Q_OS_SYMBIAN + QString platform = "Symbian"; +#endif +#ifdef Q_OS_WIN + QString platform = "Windows"; +#endif +#ifdef Q_OS_WINCE + QString platform = "Windows CE"; +#endif +#ifdef Q_OS_LINUX + QString platform = "Linux"; +#endif + return platform; +} + +void Device::getInfo(int scId, int ecId) { + Q_UNUSED(ecId) + + QDeviceInfo systemDeviceInfo; + QDeviceInfo systemInfo; + + QString platform = getOSName(); + + QString uuid = systemDeviceInfo.uniqueDeviceID(); + if (uuid.isEmpty()) { + QString deviceDescription = systemInfo.imei(0) + ";" + systemInfo.manufacturer() + ";" + systemInfo.model() + ";" + systemInfo.productName() + ";" + platform; + QString user = qgetenv("USER"); + if (user.isEmpty()) { + user = qgetenv("USERNAME"); + if (user.isEmpty()) + user = QDir::homePath(); + } + uuid = QString(QCryptographicHash::hash((deviceDescription + ";" + user).toUtf8(), QCryptographicHash::Md5).toHex()); + } + + this->cb(scId, systemDeviceInfo.model(), CORDOVA, platform, uuid, systemInfo.version(QDeviceInfo::Os)); +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,47 @@ +/* + * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ + * + * Licensed 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. + */ + +#ifndef DEVICE_H_FDSAFAS +#define DEVICE_H_FDSAFAS + +#include + +#include + +class Device: public CPlugin { + Q_OBJECT +public: + explicit Device(Cordova *cordova); + + virtual const QString fullName() override { + return Device::fullID(); + } + + virtual const QString shortName() override { + return "Device"; + } + + static const QString fullID() { + return "com.cordova.Device"; + } + +signals: + +public slots: + void getInfo(int scId, int ecId); +}; + +#endif diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,34 @@ +/* + * + * 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. + * +*/ + +var cordova = require('cordova'); +var exec = require('cordova/exec'); + +module.exports = { + getInfo:function(win,fail,args) { + Cordova.exec(function (model, cordova, platform, uuid, version) { + win({name: name, model: model, cordova: cordova, + platform: platform, uuid: uuid, version: version}); + }, null, "com.cordova.Device", "getInfo", []); + } +}; + +require("cordova/exec/proxy").add("Device", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/windows/DeviceProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/windows/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,80 @@ +/* + * + * 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. + * +*/ + +module.exports = { + + getDeviceInfo:function(win, fail, args) { + + // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId + var deviceId; + var localSettings = Windows.Storage.ApplicationData.current.localSettings; + if (localSettings.values.deviceId) { + deviceId = localSettings.values.deviceId; + } + else { + // App-specific hardware id could be used as uuid, but it changes if the hardware changes... + try { + var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id; + deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid(); + } catch (e) { + // Couldn't get the hardware UUID + deviceId = createUUID(); + } + //...so cache it per-install + localSettings.values.deviceId = deviceId; + } + + var userAgent = window.clientInformation.userAgent, + // this will report "windows" in windows8.1 and windows phone 8.1 apps + // and "windows8" in windows 8.0 apps similar to cordova.js + // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25 + devicePlatform = userAgent.indexOf("MSAppHost/1.0") == -1 ? "windows" : "windows8", + versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1]; + + var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}"; + var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10"; + var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10'; + var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\""; + var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318"; + var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3"; + var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject; + pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device, + [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY) + .then(function(rootDevices) { + for (var i = 0; i < rootDevices.length; i++) { + var rootDevice = rootDevices[i]; + if (!rootDevice.properties) continue; + if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) { + versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY]; + break; + } + } + + setTimeout(function () { + win({ platform: devicePlatform, version: versionString, + uuid: deviceId, model: window.clientInformation.platform }); + }, 0); + }); + } + +}; + +require("cordova/exec/proxy").add("Device", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,82 @@ +/* + * + * 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. + * +*/ + + +var cordova = require('cordova'); +var utils = require('cordova/utils'); + +module.exports = { + + getDeviceInfo:function(win,fail,args) { + + // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId + var deviceId; + + var localSettings = Windows.Storage.ApplicationData.current.localSettings; + + if (localSettings.values.deviceId) { + deviceId = localSettings.values.deviceId; + } + else { + // App-specific hardware id could be used as uuid, but it changes if the hardware changes... + try { + var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id; + deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid(); + } catch (e) { + // Couldn't get the hardware UUID + deviceId = createUUID(); + } + //...so cache it per-install + localSettings.values.deviceId = deviceId; + } + + var versionString = window.clientInformation.userAgent.match(/Windows NT ([0-9.]+)/)[1]; + + (function(self){ + var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}"; + var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10"; + var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10'; + var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\""; + var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318"; + var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3"; + var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject; + pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(function(rootDevices) { + + for (var i = 0; i < rootDevices.length; i++) { + var rootDevice = rootDevices[i]; + if (!rootDevice.properties) continue; + if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) { + versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY]; + break; + } + } + + setTimeout(function () { + win({ platform: "windows8", version: versionString, uuid: deviceId, model: window.clientInformation.platform }); + }, 0); + }); + })(this); + } + +}; + +require("cordova/exec/proxy").add("Device", module.exports); + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/wp/Device.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/src/wp/Device.cs Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,123 @@ +/* + Licensed 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. +*/ + +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Microsoft.Phone.Info; +using System.IO.IsolatedStorage; +using System.Windows.Resources; +using System.IO; +using System.Diagnostics; + +namespace WPCordovaClassLib.Cordova.Commands +{ + public class Device : BaseCommand + { + public void getDeviceInfo(string notused) + { + + string res = String.Format("\"name\":\"{0}\",\"platform\":\"{1}\",\"uuid\":\"{2}\",\"version\":\"{3}\",\"model\":\"{4}\"", + this.name, + this.platform, + this.uuid, + this.version, + this.model); + + res = "{" + res + "}"; + //Debug.WriteLine("Result::" + res); + DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res)); + } + + public string model + { + get + { + return DeviceStatus.DeviceName; + //return String.Format("{0},{1},{2}", DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceHardwareVersion, DeviceStatus.DeviceFirmwareVersion); + } + } + + public string name + { + get + { + return DeviceStatus.DeviceName; + + } + } + + public string platform + { + get + { + return Environment.OSVersion.Platform.ToString(); + } + } + + public string uuid + { + get + { + string returnVal = ""; + object id; + UserExtendedProperties.TryGetValue("ANID", out id); + + if (id != null) + { + returnVal = id.ToString().Substring(2, 32); + } + else + { + returnVal = "???unknown???"; + + using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication()) + { + try + { + IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage); + + using (StreamReader reader = new StreamReader(fileStream)) + { + returnVal = reader.ReadLine(); + } + } + catch (Exception /*ex*/) + { + + } + } + } + + return returnVal; + } + } + + public string version + { + get + { + return Environment.OSVersion.Version.ToString(); + } + } + + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/tests/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,31 @@ + + + + + Cordova Device Plugin Tests + Apache 2.0 + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/tests/tests.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/tests/tests.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,94 @@ +/* + * + * 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. + * +*/ + +exports.defineAutoTests = function() { + describe('Device Information (window.device)', function () { + it("should exist", function() { + expect(window.device).toBeDefined(); + }); + + it("should contain a platform specification that is a string", function() { + expect(window.device.platform).toBeDefined(); + expect((new String(window.device.platform)).length > 0).toBe(true); + }); + + it("should contain a version specification that is a string", function() { + expect(window.device.version).toBeDefined(); + expect((new String(window.device.version)).length > 0).toBe(true); + }); + + it("should contain a UUID specification that is a string or a number", function() { + expect(window.device.uuid).toBeDefined(); + if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') { + expect((new String(window.device.uuid)).length > 0).toBe(true); + } else { + expect(window.device.uuid > 0).toBe(true); + } + }); + + it("should contain a cordova specification that is a string", function() { + expect(window.device.cordova).toBeDefined(); + expect((new String(window.device.cordova)).length > 0).toBe(true); + }); + + it("should depend on the precense of cordova.version string", function() { + expect(window.cordova.version).toBeDefined(); + expect((new String(window.cordova.version)).length > 0).toBe(true); + }); + + it("should contain device.cordova equal to cordova.version", function() { + expect(window.device.cordova).toBe(window.cordova.version); + }); + + it("should contain a model specification that is a string", function() { + expect(window.device.model).toBeDefined(); + expect((new String(window.device.model)).length > 0).toBe(true); + }); + }); +}; + +exports.defineManualTests = function(contentEl, createActionButton) { + var logMessage = function (message, color) { + var log = document.getElementById('info'); + var logLine = document.createElement('div'); + if (color) { + logLine.style.color = color; + } + logLine.innerHTML = message; + log.appendChild(logLine); + } + + var clearLog = function () { + var log = document.getElementById('info'); + log.innerHTML = ''; + } + + var device_tests = '

Press Dump Device button to get device information

' + + '
' + + 'Expected result: Status box will get updated with device info. (i.e. platform, version, uuid, model, etc)'; + + contentEl.innerHTML = '
' + device_tests; + + createActionButton('Dump device', function() { + clearLog(); + logMessage(JSON.stringify(window.device, null, '\t')); + }, "dump_device"); +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/www/device.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.device/www/device.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,77 @@ +/* + * + * 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. + * +*/ + +var argscheck = require('cordova/argscheck'), + channel = require('cordova/channel'), + utils = require('cordova/utils'), + exec = require('cordova/exec'), + cordova = require('cordova'); + +channel.createSticky('onCordovaInfoReady'); +// Tell cordova channel to wait on the CordovaInfoReady event +channel.waitForInitialization('onCordovaInfoReady'); + +/** + * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the + * phone, etc. + * @constructor + */ +function Device() { + this.available = false; + this.platform = null; + this.version = null; + this.uuid = null; + this.cordova = null; + this.model = null; + + var me = this; + + channel.onCordovaReady.subscribe(function() { + me.getInfo(function(info) { + //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js + //TODO: CB-5105 native implementations should not return info.cordova + var buildLabel = cordova.version; + me.available = true; + me.platform = info.platform; + me.version = info.version; + me.uuid = info.uuid; + me.cordova = buildLabel; + me.model = info.model; + channel.onCordovaInfoReady.fire(); + },function(e) { + me.available = false; + utils.alert("[ERROR] Error initializing Cordova: " + e); + }); + }); +} + +/** + * Get device info + * + * @param {Function} successCallback The function to call when the heading data is available + * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) + */ +Device.prototype.getInfo = function(successCallback, errorCallback) { + argscheck.checkArgs('fF', 'Device.getInfo', arguments); + exec(successCallback, errorCallback, "Device", "getDeviceInfo", []); +}; + +module.exports = new Device(); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/.fetch.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/.fetch.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,1 @@ +{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.dialogs"}} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/CONTRIBUTING.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +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). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/LICENSE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/NOTICE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/NOTICE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,22 @@ + + +# org.apache.cordova.dialogs + +Plugin documentation: [doc/index.md](doc/index.md) diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/RELEASENOTES.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,112 @@ + +# 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. + + ### 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. + + +### 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 + +### 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 + +### 0.2.6 (Feb 05, 2014) +* no need to recreate the manifest.webapp file after each `cordova prepare` for FFOS +* FFOS description added + +### 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.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.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 +* 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.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 diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/de/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Dieses Plugin ermöglicht den Zugriff auf einige native Dialog-UI-Elemente. + +## Installation + + cordova plugin add org.apache.cordova.dialogs + + +## Methoden + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Zeigt eine benutzerdefinierte Warnung oder Dialogfeld Feld. Die meisten Implementierungen von Cordova ein native Dialogfeld für dieses Feature verwenden, aber einige Plattformen des Browsers `alert` Funktion, die in der Regel weniger anpassbar ist. + + Navigator.Notification.Alert (Message, AlertCallback, [Titel], [ButtonName]) + + +* **Nachricht**: Dialogfeld Nachricht. *(String)* + +* **AlertCallback**: Callback aufgerufen wird, wenn Warnungs-Dialogfeld geschlossen wird. *(Funktion)* + +* **Titel**: Dialog "Titel". *(String)* (Optional, Standard ist`Alert`) + +* **ButtonName**: Name der Schaltfläche. *(String)* (Optional, Standard ist`OK`) + +### Beispiel + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Windows Phone 7 und 8 Eigenarten + +* Es gibt keine eingebaute Datenbanksuchroutine-Warnung, aber Sie können binden, wie folgt zu nennen `alert()` im globalen Gültigkeitsbereich: + + window.alert = navigator.notification.alert; + + +* Beide `alert` und `confirm` sind nicht blockierende Aufrufe, die Ergebnisse davon nur asynchron sind. + +### Firefox OS Macken: + +Beide Native blockierenden `window.alert()` und nicht-blockierende `navigator.notification.alert()` stehen zur Verfügung. + +## navigator.notification.confirm + +Zeigt das Dialogfeld anpassbare Bestätigung. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **Nachricht**: Dialogfeld Nachricht. *(String)* + +* **ConfirmCallback**: Callback aufgerufen wird, mit Index gedrückt (1, 2 oder 3) oder wenn das Dialogfeld geschlossen wird, ohne einen Tastendruck (0). *(Funktion)* + +* **Titel**: Dialog "Titel". *(String)* (Optional, Standard ist`Confirm`) + +* **ButtonLabels**: Array von Zeichenfolgen, die Schaltflächenbezeichnungen angeben. *(Array)* (Optional, Standard ist [ `OK,Cancel` ]) + +### confirmCallback + +Die `confirmCallback` wird ausgeführt, wenn der Benutzer eine der Schaltflächen im Dialogfeld zur Bestätigung drückt. + +Der Rückruf dauert das Argument `buttonIndex` *(Anzahl)*, die der Index der Schaltfläche gedrückt ist. Beachten Sie, dass der Index 1-basierte Indizierung, verwendet, sodass der Wert ist `1` , `2` , `3` , etc.. + +### Beispiel + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Windows Phone 7 und 8 Eigenarten + +* Es gibt keine integrierte Browser-Funktion für `window.confirm` , aber Sie können es binden, indem Sie zuweisen: + + window.confirm = navigator.notification.confirm; + + +* Aufrufe von `alert` und `confirm` sind nicht blockierend, so dass das Ergebnis nur asynchron zur Verfügung steht. + +### Firefox OS Macken: + +Beide Native blockierenden `window.confirm()` und nicht-blockierende `navigator.notification.confirm()` stehen zur Verfügung. + +## navigator.notification.prompt + +Zeigt eine native Dialogfeld, das mehr als des Browsers anpassbar ist `prompt` Funktion. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **Nachricht**: Dialogfeld Nachricht. *(String)* + +* **PromptCallback**: Callback aufgerufen wird, mit Index gedrückt (1, 2 oder 3) oder wenn das Dialogfeld geschlossen wird, ohne einen Tastendruck (0). *(Funktion)* + +* **Titel**: Dialog Title *(String)* (Optional, Standard ist`Prompt`) + +* **ButtonLabels**: Array von Zeichenfolgen angeben Schaltfläche Etiketten *(Array)* (Optional, Standard ist`["OK","Cancel"]`) + +* **DefaultText**: Standard-Textbox Eingabewert ( `String` ) (Optional, Standard: leere Zeichenfolge) + +### promptCallback + +Die `promptCallback` wird ausgeführt, wenn der Benutzer eine der Schaltflächen im Eingabedialogfeld drückt. Die `results` an den Rückruf übergebene Objekt enthält die folgenden Eigenschaften: + +* **ButtonIndex**: der Index der Schaltfläche gedrückt. *(Anzahl)* Beachten Sie, dass der Index 1-basierte Indizierung, verwendet, sodass der Wert ist `1` , `2` , `3` , etc.. + +* **Eingang1**: in Eingabedialogfeld eingegebenen Text. *(String)* + +### Beispiel + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 und 8 + +### Android Eigenarten + +* Android unterstützt maximal drei Schaltflächen und mehr als das ignoriert. + +* Auf Android 3.0 und höher, werden die Schaltflächen in umgekehrter Reihenfolge für Geräte angezeigt, die das Holo-Design verwenden. + +### Firefox OS Macken: + +Beide Native blockierenden `window.prompt()` und nicht-blockierende `navigator.notification.prompt()` stehen zur Verfügung. + +## navigator.notification.beep + +Das Gerät spielt einen Signalton sound. + + navigator.notification.beep(times); + + +* **Zeiten**: die Anzahl der Wiederholungen des Signaltons. *(Anzahl)* + +### Beispiel + + // Beep twice! + navigator.notification.beep(2); + + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Amazon Fire OS Macken + +* Amazon Fire OS spielt die Standardeinstellung **Akustische Benachrichtigung** unter **Einstellungen/Display & Sound** Bereich angegeben. + +### Android Eigenarten + +* Android spielt die Standardeinstellung **Benachrichtigung Klingelton** unter **Einstellungen/Sound & Display** -Panel angegeben. + +### Windows Phone 7 und 8 Eigenarten + +* Stützt sich auf eine generische Piepton-Datei aus der Cordova-Distribution. + +### Tizen Macken + +* Tizen implementiert Signaltöne durch Abspielen einer Audiodatei über die Medien API. + +* Die Beep-Datei muss kurz sein, befinden muss einem `sounds` Unterverzeichnis des Stammverzeichnisses der Anwendung, und muss den Namen`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/es/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Este plugin proporciona acceso a algunos elementos de la interfaz nativa de diálogo. + +## Instalación + + cordova plugin add org.apache.cordova.dialogs + + +## Métodos + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Muestra un cuadro de alerta o diálogo personalizado. La mayoría de las implementaciones de Cordova utilizan un cuadro de diálogo nativa para esta característica, pero algunas plataformas utilizan el navegador `alert` la función, que es típicamente menos personalizable. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **message**: mensaje de diálogo. *(String)* + +* **alertCallback**: Callback para invocar al diálogo de alerta es desestimada. *(Función)* + +* **title**: título de diálogo. *(String)* (Opcional, el valor predeterminado de `Alert`) + +* **buttonName**: nombre del botón. *(String)* (Opcional, por defecto `Aceptar`) + +### Ejemplo + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Windows Phone 7 y 8 rarezas + +* No hay ninguna alerta del navegador integrado, pero puede enlazar uno proceda a llamar `alert()` en el ámbito global: + + window.alert = navigator.notification.alert; + + +* `alert` y `confirm` son non-blocking llamadas, cuyos resultados sólo están disponibles de forma asincrónica. + +### Firefox OS rarezas: + +Dos nativos de bloqueo `window.alert()` y no-bloqueo `navigator.notification.alert()` están disponibles. + +## navigator.notification.confirm + +Muestra un cuadro de diálogo de confirmación personalizables. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **message**: mensaje de diálogo. *(String)* + +* **confirmCallback**: Callback para invocar con índice de botón pulsado (1, 2 o 3) o cuando el diálogo es despedido sin la presión del botón (0). *(Función)* + +* **title**: título de diálogo. *(String)* (Opcional, por defecto a `confirmar`) + +* **buttonLabels**: matriz de cadenas especificando las etiquetas de botón. *(Matriz)* (Opcional, por defecto [`OK, cancelar`]) + +### confirmCallback + +El `confirmCallback` se ejecuta cuando el usuario presiona uno de los botones en el cuadro de diálogo de confirmación. + +La devolución de llamada toma el argumento `buttonIndex` *(número)*, que es el índice del botón presionado. Tenga en cuenta que el índice utiliza uno basado en la indexación, así que el valor es `1`, `2`, `3`, etc.. + +### Ejemplo + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Windows Phone 7 y 8 rarezas + +* No hay ninguna función de navegador incorporado para `window.confirm`, pero lo puede enlazar mediante la asignación: + + window.confirm = navigator.notification.confirm; + + +* Llamadas de `alert` y `confirm` son non-blocking, así que el resultado sólo está disponible de forma asincrónica. + +### Firefox OS rarezas: + +Dos nativos de bloqueo `window.confirm()` y no-bloqueo `navigator.notification.confirm()` están disponibles. + +## navigator.notification.prompt + +Muestra un cuadro de diálogo nativa que es más personalizable que del navegador `prompt` función. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **message**: mensaje de diálogo. *(String)* + +* **promptCallback**: Callback para invocar con índice del botón pulsado (1, 2 ó 3) o cuando el cuadro de diálogo es despedido sin la presión del botón (0). *(Función)* + +* **title**: título *(String)* (opcional, por defecto `puntual` de diálogo) + +* **buttonLabels**: matriz de cadenas especificando el botón etiquetas *(Array)* (opcional, por defecto `["OK", "Cancelar"]`) + +* **defaultText**: valor de la entrada predeterminada textbox ( `String` ) (opcional, por defecto: cadena vacía) + +### promptCallback + +El `promptCallback` se ejecuta cuando el usuario presiona uno de los botones en el cuadro de diálogo pronto. El objeto de `resultados` pasado a la devolución de llamada contiene las siguientes propiedades: + +* **buttonIndex**: el índice del botón presionado. *(Número)* Tenga en cuenta que el índice utiliza uno basado en la indexación, así que el valor es `1`, `2`, `3`, etc.. + +* **input1**: el texto introducido en el cuadro de diálogo pronto. *(String)* + +### Ejemplo + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Plataformas soportadas + +* Amazon fire OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 y 8 + +### Rarezas Android + +* Android soporta un máximo de tres botones e ignora nada más. + +* En Android 3.0 y posteriores, los botones se muestran en orden inverso para dispositivos que utilizan el tema de Holo. + +### Firefox OS rarezas: + +Dos nativos de bloqueo `window.prompt()` y no-bloqueo `navigator.notification.prompt()` están disponibles. + +## navigator.notification.beep + +El dispositivo reproduce un sonido sonido. + + navigator.notification.beep(times); + + +* **times**: el número de veces a repetir la señal. *(Número)* + +### Ejemplo + + / / Pitido dos veces! + navigator.notification.beep(2); + + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Amazon fuego OS rarezas + +* Amazon fuego OS reproduce el **Sonido de notificación** especificados en el panel de **configuración/pantalla y sonido** por defecto. + +### Rarezas Android + +* Android juega el **tono de notificación** especificados en el panel **ajustes de sonido y pantalla** por defecto. + +### Windows Phone 7 y 8 rarezas + +* Se basa en un archivo de sonido genérico de la distribución de Cordova. + +### Rarezas Tizen + +* Tizen implementa pitidos por reproducir un archivo de audio a través de los medios de comunicación API. + +* El archivo de sonido debe ser corto, debe estar ubicado en un `sounds` subdirectorio del directorio raíz de la aplicación y deben ser nombrados`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/fr/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Ce plugin permet d'accéder à certains éléments d'interface utilisateur native de dialogue. + +## Installation + + cordova plugin add org.apache.cordova.dialogs + + +## Méthodes + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Affiche une boîte de dialogue ou d'alerte personnalisé. La plupart des implémentations de Cordova utilisent une boîte de dialogue natives pour cette fonctionnalité, mais certaines plates-formes du navigateur `alert` fonction, qui est généralement moins personnalisable. + + Navigator.notification.Alert (message, alertCallback, [titre], [buttonName]) + + +* **message**: message de la boîte de dialogue. *(String)* + +* **alertCallback**: callback à appeler lorsque la boîte de dialogue d'alerte est rejetée. *(Fonction)* + +* **titre**: titre de la boîte de dialogue. *(String)* (Facultatif, par défaut`Alert`) + +* **buttonName**: nom du bouton. *(String)* (Facultatif, par défaut`OK`) + +### Exemple + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 et 8 +* Windows 8 + +### Windows Phone 7 et 8 Quirks + +* Il n'y a aucune boîte de dialogue d'alerte intégrée au navigateur, mais vous pouvez en lier une pour appeler `alert()` dans le scope global: + + window.alert = navigator.notification.alert; + + +* Les deux appels `alert` et `confirm` sont non-blocants, leurs résultats ne sont disponibles que de façon asynchrone. + +### Firefox OS Quirks : + +Les deux indigènes bloquant `window.alert()` et non-bloquante `navigator.notification.alert()` sont disponibles. + +## navigator.notification.confirm + +Affiche une boîte de dialogue de confirmation personnalisable. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **message**: message de la boîte de dialogue. *(String)* + +* **confirmCallback**: callback à appeler avec l'index du bouton pressé (1, 2 ou 3) ou lorsque la boîte de dialogue est fermée sans qu'un bouton ne soit pressé (0). *(Fonction)* + +* **titre**: titre de dialogue. *(String)* (Facultatif, par défaut`Confirm`) + +* **buttonLabels**: tableau de chaînes spécifiant les étiquettes des boutons. *(Array)* (Optionnel, par défaut, [ `OK,Cancel` ]) + +### confirmCallback + +Le `confirmCallback` s'exécute lorsque l'utilisateur appuie sur un bouton dans la boîte de dialogue de confirmation. + +Le rappel prend l'argument `buttonIndex` *(nombre)*, qui est l'index du bouton activé. Notez que l'index utilise base d'indexation, la valeur est `1` , `2` , `3` , etc.. + +### Exemple + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Windows Phone 7 et 8 Quirks + +* Il n'y a aucune fonction intégrée au navigateur pour `window.confirm`, mais vous pouvez en lier une en affectant: + + window.confirm = navigator.notification.confirm ; + + +* Les appels à `alert` et `confirm` sont non-bloquants, donc le résultat est seulement disponible de façon asynchrone. + +### Firefox OS Quirks : + +Les deux indigènes bloquant `window.confirm()` et non-bloquante `navigator.notification.confirm()` sont disponibles. + +## navigator.notification.prompt + +Affiche une boîte de dialogue natif qui est plus personnalisable que le navigateur `prompt` fonction. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **message**: message de la boîte de dialogue. *(String)* + +* **promptCallback**: rappel d'invoquer avec l'index du bouton pressé (1, 2 ou 3) ou lorsque la boîte de dialogue est fermée sans une presse de bouton (0). *(Fonction)* + +* **titre**: titre de la boîte de dialogue. *(String)* (Facultatif, par défaut`Alert`) + +* **buttonLabels**: tableau de chaînes spécifiant les étiquettes de boutons *(Array)* (facultatif, par défaut, les étiquettes `["OK","Cancel"]`) + +* **defaultText**: texte par défaut de la zone de texte ( `String` ) (en option, par défaut : chaîne vide) + +### promptCallback + +Le `promptCallback` s'exécute lorsque l'utilisateur appuie sur un bouton dans la boîte de dialogue d'invite. Le `results` objet passé au rappel contient les propriétés suivantes : + +* **buttonIndex**: l'index du bouton activé. *(Nombre)* Notez que l'index utilise une indexation de base 1, donc la valeur est `1` , `2` , `3` , etc. + +* **entrée 1**: le texte entré dans la boîte de dialogue d'invite. *(String)* + +### Exemple + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 et 8 + +### Quirks Android + +* Android prend en charge un maximum de trois boutons et ignore plus que cela. + +* Sur Android 3.0 et versions ultérieures, les boutons sont affichés dans l'ordre inverse pour les appareils qui utilisent le thème Holo. + +### Firefox OS Quirks : + +Les deux indigènes bloquant `window.prompt()` et non-bloquante `navigator.notification.prompt()` sont disponibles. + +## navigator.notification.beep + +Le dispositif joue un bip sonore. + + navigator.notification.beep(times); + + +* **temps**: le nombre de fois répéter le bip. *(Nombre)* + +### Exemple + + // Beep twice! + navigator.notification.beep(2); + + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Amazon Fire OS Quirks + +* Amazon Fire OS joue la valeur par défaut le **Son de Notification** spécifié sous le panneau **d'affichage des réglages/& Sound** . + +### Quirks Android + +* Android joue la **sonnerie de Notification** spécifié sous le panneau des **réglages/son et affichage** de valeur par défaut. + +### Windows Phone 7 et 8 Quirks + +* S'appuie sur un fichier générique bip de la distribution de Cordova. + +### Bizarreries de paciarelli + +* Paciarelli implémente les bips en lisant un fichier audio via les médias API. + +* Le fichier sonore doit être court, doit se trouver dans un `sounds` sous-répertoire du répertoire racine de l'application et doit être nommé`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,267 @@ + + +# org.apache.cordova.dialogs + +This plugin provides access to some native dialog UI elements +via a global `navigator.notification` object. + +Although the object is attached to the global scoped `navigator`, it is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(navigator.notification); + } + +## Installation + + cordova plugin add org.apache.cordova.dialogs + +## Methods + +- `navigator.notification.alert` +- `navigator.notification.confirm` +- `navigator.notification.prompt` +- `navigator.notification.beep` + +## navigator.notification.alert + +Shows a custom alert or dialog box. Most Cordova implementations use a native +dialog box for this feature, but some platforms use the browser's `alert` +function, which is typically less customizable. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + +- __message__: Dialog message. _(String)_ + +- __alertCallback__: Callback to invoke when alert dialog is dismissed. _(Function)_ + +- __title__: Dialog title. _(String)_ (Optional, defaults to `Alert`) + +- __buttonName__: Button name. _(String)_ (Optional, defaults to `OK`) + + +### Example + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- Firefox OS +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 +- Windows + +### Windows Phone 7 and 8 Quirks + +- There is no built-in browser alert, but you can bind one as follows to call `alert()` in the global scope: + + window.alert = navigator.notification.alert; + +- Both `alert` and `confirm` are non-blocking calls, results of which are only available asynchronously. + +### Firefox OS Quirks: + +Both native-blocking `window.alert()` and non-blocking `navigator.notification.alert()` are available. + +### BlackBerry 10 Quirks +`navigator.notification.alert('text', callback, 'title', 'text')` callback parameter is passed the number 1. + +## navigator.notification.confirm + +Displays a customizable confirmation dialog box. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + +- __message__: Dialog message. _(String)_ + +- __confirmCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_ + +- __title__: Dialog title. _(String)_ (Optional, defaults to `Confirm`) + +- __buttonLabels__: Array of strings specifying button labels. _(Array)_ (Optional, defaults to [`OK,Cancel`]) + + +### confirmCallback + +The `confirmCallback` executes when the user presses one of the +buttons in the confirmation dialog box. + +The callback takes the argument `buttonIndex` _(Number)_, which is the +index of the pressed button. Note that the index uses one-based +indexing, so the value is `1`, `2`, `3`, etc. + +### Example + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- Firefox OS +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 +- Windows + +### Windows Phone 7 and 8 Quirks + +- There is no built-in browser function for `window.confirm`, but you can bind it by assigning: + + window.confirm = navigator.notification.confirm; + +- Calls to `alert` and `confirm` are non-blocking, so the result is only available asynchronously. + +### Windows Quirks + +- On Windows8/8.1 it is not possible to add more than three buttons to MessageDialog instance. + +- On Windows Phone 8.1 it's not possible to show dialog with more than two buttons. + +### Firefox OS Quirks: + +Both native-blocking `window.confirm()` and non-blocking `navigator.notification.confirm()` are available. + +## navigator.notification.prompt + +Displays a native dialog box that is more customizable than the browser's `prompt` function. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + +- __message__: Dialog message. _(String)_ + +- __promptCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_ + +- __title__: Dialog title _(String)_ (Optional, defaults to `Prompt`) + +- __buttonLabels__: Array of strings specifying button labels _(Array)_ (Optional, defaults to `["OK","Cancel"]`) + +- __defaultText__: Default textbox input value (`String`) (Optional, Default: empty string) + +### promptCallback + +The `promptCallback` executes when the user presses one of the buttons +in the prompt dialog box. The `results` object passed to the callback +contains the following properties: + +- __buttonIndex__: The index of the pressed button. _(Number)_ Note that the index uses one-based indexing, so the value is `1`, `2`, `3`, etc. + + + +- __input1__: The text entered in the prompt dialog box. _(String)_ + +### Example + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + +### Supported Platforms + +- Amazon Fire OS +- Android +- Firefox OS +- iOS +- Windows Phone 7 and 8 + +### Android Quirks + +- Android supports a maximum of three buttons, and ignores any more than that. + +- On Android 3.0 and later, buttons are displayed in reverse order for devices that use the Holo theme. + +### Firefox OS Quirks: + +Both native-blocking `window.prompt()` and non-blocking `navigator.notification.prompt()` are available. + +## navigator.notification.beep + +The device plays a beep sound. + + navigator.notification.beep(times); + +- __times__: The number of times to repeat the beep. _(Number)_ + +### Example + + // Beep twice! + navigator.notification.beep(2); + +### Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- iOS +- Tizen +- Windows Phone 7 and 8 +- Windows 8 + +### Amazon Fire OS Quirks + +- Amazon Fire OS plays the default __Notification Sound__ specified under the __Settings/Display & Sound__ panel. + +### Android Quirks + +- Android plays the default __Notification ringtone__ specified under the __Settings/Sound & Display__ panel. + +### Windows Phone 7 and 8 Quirks + +- Relies on a generic beep file from the Cordova distribution. + +### Tizen Quirks + +- 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 -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/it/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Questo plugin consente di accedere ad alcuni elementi di interfaccia utente nativa del dialogo. + +## Installazione + + cordova plugin add org.apache.cordova.dialogs + + +## Metodi + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Mostra una finestra di avviso o la finestra di dialogo personalizzata. La maggior parte delle implementazioni di Cordova una dialogo nativa per questa caratteristica, ma alcune piattaforme utilizzano il browser `alert` funzione, che è in genere meno personalizzabile. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **messaggio**: messaggio finestra di dialogo. *(String)* + +* **alertCallback**: Callback da richiamare quando viene chiusa la finestra di avviso. *(Funzione)* + +* **titolo**: titolo di dialogo. *(String)* (Opzionale, default è`Alert`) + +* **buttonName**: nome del pulsante. *(String)* (Opzionale, default è`OK`) + +### Esempio + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Windows Phone 7 e 8 stranezze + +* Non non c'è nessun avviso del browser integrato, ma è possibile associare uno come segue per chiamare `alert()` in ambito globale: + + window.alert = navigator.notification.alert; + + +* Entrambi `alert` e `confirm` sono non di blocco chiamate, risultati di cui sono disponibili solo in modo asincrono. + +### Firefox OS Stranezze: + +Entrambi nativi di blocco `window.alert()` e non bloccante `navigator.notification.alert()` sono disponibili. + +## navigator.notification.confirm + +Visualizza una finestra di dialogo conferma personalizzabile. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **messaggio**: messaggio finestra di dialogo. *(String)* + +* **confirmCallback**: Callback da richiamare con l'indice del pulsante premuto (1, 2 o 3) o quando la finestra di dialogo viene chiusa senza una pressione del pulsante (0). *(Funzione)* + +* **titolo**: titolo di dialogo. *(String)* (Opzionale, default è`Confirm`) + +* **buttonLabels**: matrice di stringhe che specificano le etichette dei pulsanti. *(Matrice)* (Opzionale, default è [ `OK,Cancel` ]) + +### confirmCallback + +Il `confirmCallback` viene eseguito quando l'utente preme uno dei pulsanti nella finestra di dialogo conferma. + +Il callback accetta l'argomento `buttonIndex` *(numero)*, che è l'indice del pulsante premuto. Nota che l'indice utilizza l'indicizzazione base uno, quindi il valore è `1` , `2` , `3` , ecc. + +### Esempio + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Windows Phone 7 e 8 stranezze + +* Non non c'è nessuna funzione browser incorporato per `window.confirm` , ma è possibile associare assegnando: + + window.confirm = navigator.notification.confirm; + + +* Chiama al `alert` e `confirm` sono non bloccante, quindi il risultato è disponibile solo in modo asincrono. + +### Firefox OS Stranezze: + +Entrambi nativi di blocco `window.confirm()` e non bloccante `navigator.notification.confirm()` sono disponibili. + +## navigator.notification.prompt + +Visualizza una finestra di dialogo nativa che è più personalizzabile del browser `prompt` funzione. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **messaggio**: messaggio finestra di dialogo. *(String)* + +* **promptCallback**: Callback da richiamare con l'indice del pulsante premuto (1, 2 o 3) o quando la finestra di dialogo viene chiusa senza una pressione del pulsante (0). *(Funzione)* + +* **titolo**: dialogo titolo *(String)* (opzionale, default è`Prompt`) + +* **buttonLabels**: matrice di stringhe specificando il pulsante etichette *(Array)* (opzionale, default è`["OK","Cancel"]`) + +* **defaultText**: valore di input predefinito textbox ( `String` ) (opzionale, Default: stringa vuota) + +### promptCallback + +Il `promptCallback` viene eseguito quando l'utente preme uno dei pulsanti nella finestra di dialogo richiesta. Il `results` oggetto passato al metodo di callback contiene le seguenti proprietà: + +* **buttonIndex**: l'indice del pulsante premuto. *(Numero)* Nota che l'indice utilizza l'indicizzazione base uno, quindi il valore è `1` , `2` , `3` , ecc. + +* **INPUT1**: il testo immesso nella finestra di dialogo richiesta. *(String)* + +### Esempio + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 e 8 + +### Stranezze Android + +* Android supporta un massimo di tre pulsanti e ignora di più di quello. + +* Su Android 3.0 e versioni successive, i pulsanti vengono visualizzati in ordine inverso per dispositivi che utilizzano il tema Holo. + +### Firefox OS Stranezze: + +Entrambi nativi di blocco `window.prompt()` e non bloccante `navigator.notification.prompt()` sono disponibili. + +## navigator.notification.beep + +Il dispositivo riproduce un bip sonoro. + + navigator.notification.beep(times); + + +* **volte**: il numero di volte per ripetere il segnale acustico. *(Numero)* + +### Esempio + + // Beep twice! + navigator.notification.beep(2); + + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Amazon fuoco OS stranezze + +* Amazon fuoco OS riproduce il **Suono di notifica** specificato sotto il pannello **Impostazioni/Display e il suono** predefinito. + +### Stranezze Android + +* Android giochi default **Notification ringtone** specificato sotto il pannello **impostazioni/audio e Display** . + +### Windows Phone 7 e 8 stranezze + +* Si basa su un file generico bip dalla distribuzione di Cordova. + +### Tizen stranezze + +* Tizen implementa bip di riproduzione di un file audio tramite i media API. + +* Il file beep deve essere breve, deve essere situato un `sounds` sottodirectory della directory radice dell'applicazione e deve essere denominato`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ja/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +このプラグインはいくつかのネイティブのダイアログの UI 要素へのアクセスを提供します。 + +## インストール + + cordova plugin add org.apache.cordova.dialogs + + +## メソッド + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +カスタムの警告またはダイアログ ボックスが表示されます。 ほとんどコルドバ ネイティブ] ダイアログ ボックスの使用この機能がいくつかのプラットフォームを使用して、ブラウザーの `alert` 関数は、通常より少なくカスタマイズ可能です。 + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **メッセージ**: ダイアログ メッセージ。*(文字列)* + +* **alertCallback**: 警告ダイアログが閉じられたときに呼び出すコールバック。*(機能)* + +* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Alert`) + +* **buttonName**: ボタンの名前。*(文字列)*(省略可能、既定値は`OK`) + +### 例 + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* Firefox の OS +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### Windows Phone 7 と 8 癖 + +* 組み込みのブラウザー警告がない呼び出しを次のように 1 つをバインドすることができます `alert()` 、グローバル スコープで。 + + window.alert = navigator.notification.alert; + + +* 両方の `alert` と `confirm` は非ブロッキング呼び出し、結果は非同期的にのみ利用できます。 + +### Firefox OS 互換: + +両方のネイティブ ブロック `window.alert()` ノン ブロッキングと `navigator.notification.alert()` は利用できます。 + +## navigator.notification.confirm + +カスタマイズ可能な確認のダイアログ ボックスが表示されます。 + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **メッセージ**: ダイアログ メッセージ。*(文字列)* + +* **confirmCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)* + +* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Confirm`) + +* **buttonLabels**: ボタンのラベルを指定する文字列の配列。*(配列)*(省略可能、既定値は [ `OK,Cancel` ]) + +### confirmCallback + +`confirmCallback`の確認ダイアログ ボックスでボタンを押したときに実行されます。 + +コールバック引数 `buttonIndex` *(番号)*は、押されたボタンのインデックス。 メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。 + +### 例 + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* Firefox の OS +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### Windows Phone 7 と 8 癖 + +* 組み込みブラウザーの機能はありません `window.confirm` が割り当てることによってバインドすることができます。 + + window.confirm = navigator.notification.confirm; + + +* 呼び出しを `alert` と `confirm` では非ブロッキング、結果は非同期的にのみ使用できます。 + +### Firefox OS 互換: + +両方のネイティブ ブロック `window.confirm()` ノン ブロッキングと `navigator.notification.confirm()` は利用できます。 + +## navigator.notification.prompt + +ブラウザーのより詳細にカスタマイズはネイティブのダイアログ ボックスが表示されます `prompt` 関数。 + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **メッセージ**: ダイアログ メッセージ。*(文字列)* + +* **promptCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)* + +* **タイトル**: *(文字列)* (省略可能、既定値のタイトル] ダイアログ`Prompt`) + +* **buttonLabels**: ボタンを指定する文字列の配列*(配列)* (省略可能、既定値のラベル`["OK","Cancel"]`) + +* **これら**: 既定テキスト ボックスの入力値 ( `String` ) (省略可能、既定: 空の文字列) + +### promptCallback + +`promptCallback`プロンプト ダイアログ ボックス内のボタンのいずれかを押したときに実行されます。`results`コールバックに渡されるオブジェクトに、次のプロパティが含まれています。 + +* **buttonIndex**: 押されたボタンのインデックス。*(数)*メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。 + +* **input1**: プロンプト ダイアログ ボックスに入力したテキスト。*(文字列)* + +### 例 + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* Firefox の OS +* iOS +* Windows Phone 7 と 8 + +### Android の癖 + +* Android は最大 3 つのボタンをサポートしているし、それ以上無視します。 + +* アンドロイド 3.0 と後、ホロのテーマを使用するデバイスを逆の順序でボタンが表示されます。 + +### Firefox OS 互換: + +両方のネイティブ ブロック `window.prompt()` ノン ブロッキングと `navigator.notification.prompt()` は利用できます。 + +## navigator.notification.beep + +デバイス サウンドをビープ音を再生します。 + + navigator.notification.beep(times); + + +* **回**: ビープ音を繰り返す回数。*(数)* + +### 例 + + // Beep twice! + navigator.notification.beep(2); + + +### サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* iOS +* Tizen +* Windows Phone 7 と 8 +* Windows 8 + +### アマゾン火 OS 癖 + +* アマゾン火 OS デフォルト**設定/表示 & サウンド**パネルの下に指定した**通知音**を果たしています。 + +### Android の癖 + +* アンドロイド デフォルト**通知着信音****設定/サウンド & ディスプレイ**パネルの下に指定を果たしています。 + +### Windows Phone 7 と 8 癖 + +* コルドバ分布からジェネリック ビープ音ファイルに依存します。 + +### Tizen の癖 + +* Tizen は、メディア API 経由でオーディオ ファイルを再生してビープ音を実装します。 + +* ビープ音ファイルする必要があります短いである必要があります、 `sounds` 、アプリケーションのルート ディレクトリのサブディレクトリと命名する必要があります`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ko/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +이 플러그인 몇 가지 기본 대화 상자 UI 요소에 액세스할 수 있습니다. + +## 설치 + + cordova plugin add org.apache.cordova.dialogs + + +## 메서드 + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +사용자 지정 경고 또는 대화 상자를 보여 줍니다. 이 기능에 대 한 기본 대화 상자를 사용 하는 대부분의 코르도바 구현 하지만 일부 플랫폼 사용 브라우저의 `alert` 함수는 일반적으로 덜 사용자 정의할 수 있습니다. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **메시지**: 대화 메시지. *(문자열)* + +* **alertCallback**: 콜백을 호출할 때 경고 대화 기 각. *(기능)* + +* **제목**: 제목 대화 상자. *(문자열)* (옵션, 기본값:`Alert`) + +* **buttonName**: 단추 이름. *(문자열)* (옵션, 기본값:`OK`) + +### 예를 들어 + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* Firefox 운영 체제 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### Windows Phone 7, 8 특수 + +* 아니 내장 브라우저 경고 하지만 다음과 같이 전화를 바인딩할 수 있습니다 `alert()` 전역 범위에서: + + window.alert = navigator.notification.alert; + + +* 둘 다 `alert` 와 `confirm` 는 비차단 호출, 결과 비동기적으로 사용할 수 있습니다. + +### 파이어 폭스 OS 단점: + +두 기본 차단 `window.alert()` 및 비차단 `navigator.notification.alert()` 사용할 수 있습니다. + +## navigator.notification.confirm + +사용자 정의 확인 대화 상자가 표시 됩니다. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **메시지**: 대화 메시지. *(문자열)* + +* **confirmCallback**: 인덱스 버튼 (1, 2 또는 3) 또는 대화 상자 버튼을 누르면 (0) 없이 기 각 될 때 호출할 콜백 합니다. *(기능)* + +* **제목**: 제목 대화 상자. *(문자열)* (옵션, 기본값:`Confirm`) + +* **buttonLabels**: 단추 레이블을 지정 하는 문자열 배열입니다. *(배열)* (옵션, 기본값은 [ `OK,Cancel` ]) + +### confirmCallback + +`confirmCallback`사용자가 확인 대화 상자에서 단추 중 하나를 누를 때 실행 됩니다. + +콜백 인수 `buttonIndex` *(번호)를*누르면된 버튼의 인덱스입니다. 참고 인덱스에서는 인덱스 1부터 값은 `1` , `2` , `3` , 등등. + +### 예를 들어 + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* Firefox 운영 체제 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### Windows Phone 7, 8 특수 + +* 에 대 한 기본 제공 브라우저 함수가 `window.confirm` , 그러나 할당 하 여 바인딩할 수 있습니다: + + window.confirm = navigator.notification.confirm; + + +* 호출 `alert` 및 `confirm` 되므로 차단 되지 않은 결과만 비동기적으로 사용할 수 있습니다. + +### 파이어 폭스 OS 단점: + +두 기본 차단 `window.confirm()` 및 비차단 `navigator.notification.confirm()` 사용할 수 있습니다. + +## navigator.notification.prompt + +브라우저의 보다 더 많은 사용자 정의 기본 대화 상자 표시 `prompt` 기능. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **메시지**: 대화 메시지. *(문자열)* + +* **promptCallback**: 인덱스 버튼 (1, 2 또는 3) 또는 대화 상자 버튼을 누르면 (0) 없이 기 각 될 때 호출할 콜백 합니다. *(기능)* + +* **제목**: 제목 *(문자열)* (옵션, 기본값 대화 상자`Prompt`) + +* **buttonLabels**: 단추를 지정 하는 문자열의 배열 *(배열)* (옵션, 기본값은 레이블`["OK","Cancel"]`) + +* **defaultText**: 기본 텍스트 상자 입력 값 ( `String` ) (옵션, 기본값: 빈 문자열) + +### promptCallback + +`promptCallback`사용자가 프롬프트 대화 상자에서 단추 중 하나를 누를 때 실행 됩니다. `results`콜백에 전달 된 개체에는 다음 속성이 포함 되어 있습니다: + +* **buttonIndex**: 눌려진된 버튼의 인덱스. *(수)* 참고 인덱스에서는 인덱스 1부터 값은 `1` , `2` , `3` , 등등. + +* **input1**: 프롬프트 대화 상자에 입력 한 텍스트. *(문자열)* + +### 예를 들어 + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* Firefox 운영 체제 +* iOS +* Windows Phone 7과 8 + +### 안 드 로이드 단점 + +* 안 드 로이드 최대 3 개의 단추를 지원 하 고 그것 보다는 더 이상 무시 합니다. + +* 안 드 로이드 3.0 및 나중에, 단추는 홀로 테마를 사용 하는 장치에 대 한 반대 순서로 표시 됩니다. + +### 파이어 폭스 OS 단점: + +두 기본 차단 `window.prompt()` 및 비차단 `navigator.notification.prompt()` 사용할 수 있습니다. + +## navigator.notification.beep + +장치는 경고음 소리를 재생 합니다. + + navigator.notification.beep(times); + + +* **시간**: 경고음을 반복 하는 횟수. *(수)* + +### 예를 들어 + + // Beep twice! + navigator.notification.beep(2); + + +### 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* iOS +* Tizen +* Windows Phone 7과 8 +* 윈도우 8 + +### 아마존 화재 OS 단점 + +* 아마존 화재 운영 체제 기본 **설정/디스플레이 및 사운드** 패널에 지정 된 **알림 소리** 재생 됩니다. + +### 안 드 로이드 단점 + +* 안 드 로이드 기본 **알림 벨소리** **설정/사운드 및 디스플레이** 패널에서 지정 합니다. + +### Windows Phone 7, 8 특수 + +* 코르 도우 바 분포에서 일반 경고음 파일에 의존합니다. + +### Tizen 특수 + +* Tizen은 미디어 API 통해 오디오 파일을 재생 하 여 경고음을 구현 합니다. + +* 경고음 파일에 위치 해야 합니다, 짧은 해야 한 `sounds` 응용 프로그램의 루트 디렉터리의 하위 디렉터리 명명 해야 합니다`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/pl/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Ten plugin umożliwia dostęp do niektórych rodzimych okna dialogowego elementy interfejsu użytkownika. + +## Instalacja + + cordova plugin add org.apache.cordova.dialogs + + +## Metody + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Pokazuje niestandardowe wpisu lub okno dialogowe. Większość implementacji Cordova używać rodzimych okno dialogowe dla tej funkcji, ale niektóre platformy używać przeglądarki `alert` funkcja, który jest zazwyczaj mniej konfigurowalny. + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **wiadomość**: komunikat okna dialogowego. *(String)* + +* **alertCallback**: wywołanie zwrotne do wywołania, gdy okno dialogowe alert jest oddalona. *(Funkcja)* + +* **tytuł**: okno tytuł. *(String)* (Opcjonalna, domyślnie`Alert`) + +* **buttonName**: Nazwa przycisku. *(String)* (Opcjonalna, domyślnie`OK`) + +### Przykład + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Windows Phone 7 i 8 dziwactwa + +* Istnieje wpis nie wbudowana przeglądarka, ale można powiązać w następujący sposób na wywołanie `alert()` w globalnym zasięgu: + + window.alert = navigator.notification.alert; + + +* Zarówno `alert` i `confirm` są bez blokowania połączeń, których wyniki są tylko dostępne asynchronicznie. + +### Firefox OS dziwactwa: + +Blokuje zarówno rodzimych `window.alert()` i bez blokowania `navigator.notification.alert()` są dostępne. + +## navigator.notification.confirm + +Wyświetla okno dialogowe potwierdzenia konfigurowalny. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **wiadomość**: komunikat okna dialogowego. *(String)* + +* **confirmCallback**: wywołanie zwrotne do wywołania z indeksu z przycisku (1, 2 lub 3), lub gdy okno jest zwolniony bez naciśnij przycisk (0). *(Funkcja)* + +* **tytuł**: okno tytuł. *(String)* (Opcjonalna, domyślnie`Confirm`) + +* **buttonLabels**: tablica ciągów, określając etykiety przycisków. *(Tablica)* (Opcjonalna, domyślnie [ `OK,Cancel` ]) + +### confirmCallback + +`confirmCallback`Wykonuje, gdy użytkownik naciśnie klawisz jeden z przycisków w oknie dialogowym potwierdzenia. + +Wywołania zwrotnego przyjmuje argument `buttonIndex` *(numer)*, który jest indeksem wciśnięty przycisk. Uwaga, że indeks używa, na podstawie jednego indeksowania, więc wartość jest `1` , `2` , `3` , itp. + +### Przykład + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Windows Phone 7 i 8 dziwactwa + +* Istnieje funkcja wbudowana przeglądarka nie `window.confirm` , ale można go powiązać przypisując: + + window.confirm = navigator.notification.confirm; + + +* Wzywa do `alert` i `confirm` są bez blokowania, więc wynik jest tylko dostępnych asynchronicznie. + +### Firefox OS dziwactwa: + +Blokuje zarówno rodzimych `window.confirm()` i bez blokowania `navigator.notification.confirm()` są dostępne. + +## navigator.notification.prompt + +Wyświetla okno dialogowe macierzystego, który bardziej niż przeglądarki `prompt` funkcja. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **wiadomość**: komunikat okna dialogowego. *(String)* + +* **promptCallback**: wywołanie zwrotne do wywołania z indeksu z przycisku (1, 2 lub 3), lub gdy okno jest zwolniony bez naciśnij przycisk (0). *(Funkcja)* + +* **tytuł**: okno tytuł *(String)* (opcjonalna, domyślnie`Prompt`) + +* **buttonLabels**: tablica ciągów, określając przycisk etykiety *(tablica)* (opcjonalna, domyślnie`["OK","Cancel"]`) + +* **defaultText**: wartość wejściowa tekstowym domyślnego ( `String` ) (opcjonalna, domyślnie: pusty ciąg) + +### promptCallback + +`promptCallback`Wykonuje, gdy użytkownik naciśnie klawisz jeden z przycisków w oknie dialogowym polecenia. `results`Obiekt przekazywany do wywołania zwrotnego zawiera następujące właściwości: + +* **buttonIndex**: indeks wciśnięty przycisk. *(Liczba)* Uwaga, że indeks używa, na podstawie jednego indeksowania, więc wartość jest `1` , `2` , `3` , itp. + +* **input1**: Tekst wprowadzony w oknie polecenia. *(String)* + +### Przykład + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 i 8 + +### Dziwactwa Androida + +* Android obsługuje maksymalnie trzy przyciski i więcej niż to ignoruje. + +* Android 3.0 i nowszych przyciski są wyświetlane w kolejności odwrotnej do urządzenia, które używają tematu Holo. + +### Firefox OS dziwactwa: + +Blokuje zarówno rodzimych `window.prompt()` i bez blokowania `navigator.notification.prompt()` są dostępne. + +## navigator.notification.beep + +Urządzenie odtwarza sygnał ciągły dźwięk. + + navigator.notification.beep(times); + + +* **razy**: liczba powtórzeń po sygnale. *(Liczba)* + +### Przykład + + // Beep twice! + navigator.notification.beep(2); + + +### Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Amazon ogień OS dziwactwa + +* Amazon ogień OS gra domyślny **Dźwięk powiadomienia** określone w panelu **ekranu/ustawienia i dźwięk** . + +### Dziwactwa Androida + +* Android gra domyślnie **dzwonek powiadomienia** określone w panelu **ustawień/dźwięk i wyświetlacz** . + +### Windows Phone 7 i 8 dziwactwa + +* Opiera się na pliku rodzajowego sygnał z rozkładu Cordova. + +### Dziwactwa Tizen + +* Tizen implementuje dźwięków przez odtwarzania pliku audio za pośrednictwem mediów API. + +* Plik dźwiękowy muszą być krótkie, musi znajdować się w `sounds` podkatalogu katalogu głównego aplikacji i musi być nazwany`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ru/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +Этот плагин обеспечивает доступ к некоторым элементам собственного диалогового окна пользовательского интерфейса. + +## Установка + + cordova plugin add org.apache.cordova.dialogs + + +## Методы + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +Показывает окно пользовательские оповещения или диалоговое окно. Большинство реализаций Cordova использовать диалоговое окно родной для этой функции, но некоторые платформы браузера `alert` функция, которая как правило менее настраивается. + + Navigator.Notification.Alert (сообщение, alertCallback, [название], [buttonName]) + + +* **сообщение**: сообщение диалога. *(Строка)* + +* **alertCallback**: обратного вызова для вызова, когда закрывается диалоговое окно оповещения. *(Функция)* + +* **название**: диалоговое окно название. *(Строка)* (Опционально, по умолчанию`Alert`) + +* **buttonName**: имя кнопки. *(Строка)* (Опционально, по умолчанию`OK`) + +### Пример + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Особенности Windows Phone 7 и 8 + +* Существует предупреждение не встроенный браузер, но можно привязать один следующим позвонить `alert()` в глобальной области действия: + + window.alert = navigator.notification.alert; + + +* Оба `alert` и `confirm` являются не блокировка звонков, результаты которых доступны только асинхронно. + +### Firefox OS причуды: + +Как родной блокировка `window.alert()` и неблокирующий `navigator.notification.alert()` доступны. + +## navigator.notification.confirm + +Отображает диалоговое окно Настраиваемый подтверждения. + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **сообщение**: сообщение диалога. *(Строка)* + +* **confirmCallback**: обратного вызова с индексом кнопка нажата (1, 2 или 3) или когда диалоговое окно закрывается без нажатия кнопки (0). *(Функция)* + +* **название**: диалоговое окно название. *(Строка)* (Опционально, по умолчанию`Confirm`) + +* **buttonLabels**: массив строк, указав названия кнопок. *(Массив)* (Не обязательно, по умолчанию [ `OK,Cancel` ]) + +### confirmCallback + +`confirmCallback`Выполняется, когда пользователь нажимает одну из кнопок в диалоговом окне подтверждения. + +Аргументом функции обратного вызова `buttonIndex` *(номер)*, который является индекс нажатой кнопки. Обратите внимание, что индекс использует единицы индексации, поэтому значение `1` , `2` , `3` , и т.д. + +### Пример + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Особенности Windows Phone 7 и 8 + +* Нет встроенного браузера функция для `window.confirm` , но его можно привязать путем присвоения: + + window.confirm = navigator.notification.confirm; + + +* Вызовы `alert` и `confirm` являются не блокируется, поэтому результат доступен только асинхронно. + +### Firefox OS причуды: + +Как родной блокировка `window.confirm()` и неблокирующий `navigator.notification.confirm()` доступны. + +## navigator.notification.prompt + +Отображает родной диалоговое окно более настраиваемый, чем в браузере `prompt` функции. + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **сообщение**: сообщение диалога. *(Строка)* + +* **promptCallback**: обратного вызова с индексом кнопка нажата (1, 2 или 3) или когда диалоговое окно закрывается без нажатия кнопки (0). *(Функция)* + +* **название**: диалоговое окно название *(String)* (опционально, по умолчанию`Prompt`) + +* **buttonLabels**: массив строк, указав кнопку этикетки *(массив)* (опционально, по умолчанию`["OK","Cancel"]`) + +* **defaultText**: по умолчанию textbox входное значение ( `String` ) (опционально, по умолчанию: пустая строка) + +### promptCallback + +`promptCallback`Выполняется, когда пользователь нажимает одну из кнопок в диалоговом окне приглашения. `results`Объект, переданный в метод обратного вызова содержит следующие свойства: + +* **buttonIndex**: индекс нажатой кнопки. *(Число)* Обратите внимание, что индекс использует единицы индексации, поэтому значение `1` , `2` , `3` , и т.д. + +* **INPUT1**: текст, введенный в диалоговом окне приглашения. *(Строка)* + +### Пример + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* Firefox OS +* iOS +* Windows Phone 7 и 8 + +### Особенности Android + +* Android поддерживает максимум из трех кнопок и игнорирует больше, чем это. + +* На Android 3.0 и более поздних версиях кнопки отображаются в обратном порядке для устройств, которые используют тему холо. + +### Firefox OS причуды: + +Как родной блокировка `window.prompt()` и неблокирующий `navigator.notification.prompt()` доступны. + +## navigator.notification.beep + +Устройство воспроизводит звуковой сигнал звук. + + navigator.notification.beep(times); + + +* **раз**: количество раз, чтобы повторить сигнал. *(Число)* + +### Пример + + // Beep twice! + navigator.notification.beep(2); + + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Особенности Amazon Fire OS + +* Amazon Fire OS играет по умолчанию **Звук уведомления** , указанного на панели **параметров/дисплей и звук** . + +### Особенности Android + +* Android играет по умолчанию **уведомления рингтон** указанных в панели **настройки/звук и дисплей** . + +### Особенности Windows Phone 7 и 8 + +* Опирается на общий звуковой файл из дистрибутива Кордова. + +### Особенности Tizen + +* Tizen реализует гудков, воспроизведении аудиофайла через СМИ API. + +* Звуковой файл должен быть коротким, должен быть расположен в `sounds` подкаталог корневого каталога приложения и должны быть названы`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/zh/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,247 @@ + + +# org.apache.cordova.dialogs + +這個外掛程式提供了對一些本機對話方塊的使用者介面元素的訪問。 + +## 安裝 + + cordova plugin add org.apache.cordova.dialogs + + +## 方法 + +* `navigator.notification.alert` +* `navigator.notification.confirm` +* `navigator.notification.prompt` +* `navigator.notification.beep` + +## navigator.notification.alert + +顯示一個自訂的警報或對話方塊框。 大多數科爾多瓦實現使用本機對話方塊中的此項功能,但一些平臺使用瀏覽器的 `alert` 函數,這是通常不那麼可自訂。 + + navigator.notification.alert(message, alertCallback, [title], [buttonName]) + + +* **消息**: 消息對話方塊。*(字串)* + +* **alertCallback**: 當警報對話方塊的被解雇時要調用的回檔。*(函數)* + +* **標題**: 標題對話方塊。*(字串)*(可選,預設值為`Alert`) + +* **buttonName**: 按鈕名稱。*(字串)*(可選,預設值為`OK`) + +### 示例 + + function alertDismissed() { + // do something + } + + navigator.notification.alert( + 'You are the winner!', // message + alertDismissed, // callback + 'Game Over', // title + 'Done' // buttonName + ); + + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* 火狐瀏覽器作業系統 +* iOS +* Tizen +* Windows Phone 7 和 8 +* Windows 8 + +### Windows Phone 7 和 8 怪癖 + +* 有沒有內置瀏覽器警報,但你可以綁定一個,如下所示調用 `alert()` 在全球範圍內: + + window.alert = navigator.notification.alert; + + +* 兩個 `alert` 和 `confirm` 的非阻塞的調用,其中的結果才是可用的非同步。 + +### 火狐瀏覽器作業系統怪癖: + +這兩個本機阻止 `window.alert()` 和非阻塞 `navigator.notification.alert()` 可用。 + +## navigator.notification.confirm + +顯示一個可自訂的確認對話方塊。 + + navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels]) + + +* **消息**: 消息對話方塊。*(字串)* + +* **confirmCallback**: 要用索引 (1、 2 或 3) 按下的按鈕,或者在沒有按下按鈕 (0) 駁回了對話方塊中時調用的回檔。*(函數)* + +* **標題**: 標題對話方塊。*(字串)*(可選,預設值為`Confirm`) + +* **buttonLabels**: 指定按鈕標籤的字串陣列。*(陣列)*(可選,預設值為 [ `OK,Cancel` ]) + +### confirmCallback + +`confirmCallback`當使用者按下確認對話方塊中的按鈕之一的時候執行。 + +回檔將參數 `buttonIndex` *(編號)*,它是按下的按鈕的索引。 請注意索引使用基於 1 的索引,所以值是 `1` , `2` , `3` ,等等。 + +### 示例 + + function onConfirm(buttonIndex) { + alert('You selected button ' + buttonIndex); + } + + navigator.notification.confirm( + 'You are the winner!', // message + onConfirm, // callback to invoke with index of button pressed + 'Game Over', // title + ['Restart','Exit'] // buttonLabels + ); + + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* 火狐瀏覽器作業系統 +* iOS +* Tizen +* Windows Phone 7 和 8 +* Windows 8 + +### Windows Phone 7 和 8 怪癖 + +* 有沒有內置的瀏覽器功能的 `window.confirm` ,但你可以將它綁定通過分配: + + window.confirm = navigator.notification.confirm; + + +* 調用到 `alert` 和 `confirm` 的非阻塞,所以結果就是只可用以非同步方式。 + +### 火狐瀏覽器作業系統怪癖: + +這兩個本機阻止 `window.confirm()` 和非阻塞 `navigator.notification.confirm()` 可用。 + +## navigator.notification.prompt + +顯示本機的對話方塊,更可自訂的瀏覽器比 `prompt` 函數。 + + navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText]) + + +* **消息**: 消息對話方塊。*(字串)* + +* **promptCallback**: 要用索引 (1、 2 或 3) 按下的按鈕,或者在沒有按下按鈕 (0) 駁回了對話方塊中時調用的回檔。*(函數)* + +* **標題**: 對話方塊的標題*(字串)* (可選,預設值為`Prompt`) + +* **buttonLabels**: 陣列,這些字串指定按鈕標籤*(陣列)* (可選,預設值為`["OK","Cancel"]`) + +* **defaultText**: 預設文字方塊中輸入值 ( `String` ) (可選,預設值: 空字串) + +### promptCallback + +`promptCallback`當使用者按下一個提示對話方塊中的按鈕時執行。`results`物件傳遞給回檔的包含以下屬性: + +* **buttonIndex**: 按下的按鈕的索引。*(人數)*請注意索引使用基於 1 的索引,所以值是 `1` , `2` , `3` ,等等。 + +* **輸入 1**: 在提示對話方塊中輸入的文本。*(字串)* + +### 示例 + + function onPrompt(results) { + alert("You selected button number " + results.buttonIndex + " and entered " + results.input1); + } + + navigator.notification.prompt( + 'Please enter your name', // message + onPrompt, // callback to invoke + 'Registration', // title + ['Ok','Exit'], // buttonLabels + 'Jane Doe' // defaultText + ); + + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 火狐瀏覽器作業系統 +* iOS +* Windows Phone 7 和 8 + +### Android 的怪癖 + +* Android 支援最多的三個按鈕,並忽略任何更多。 + +* 關於 Android 3.0 及更高版本,使用全息主題的設備按相反的順序顯示按鈕。 + +### 火狐瀏覽器作業系統怪癖: + +這兩個本機阻止 `window.prompt()` 和非阻塞 `navigator.notification.prompt()` 可用。 + +## navigator.notification.beep + +該設備播放提示音聲音。 + + navigator.notification.beep(times); + + +* **時間**: 的次數重複發出蜂鳴音。*(人數)* + +### 示例 + + // Beep twice! + navigator.notification.beep(2); + + +### 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* iOS +* Tizen +* Windows Phone 7 和 8 +* Windows 8 + +### 亞馬遜火 OS 怪癖 + +* 亞馬遜火 OS 播放預設**設置/顯示 & 聲音**面板下指定的**通知聲音**。 + +### Android 的怪癖 + +* Android 系統播放的預設**通知鈴聲****設置/聲音和顯示**面板下指定。 + +### Windows Phone 7 和 8 怪癖 + +* 依賴泛型蜂鳴音檔從科爾多瓦分佈。 + +### Tizen 怪癖 + +* Tizen 通過播放音訊檔通過媒體 API 實現會發出蜂鳴聲。 + +* 蜂鳴音檔必須很短,必須設在 `sounds` 子目錄中的應用程式的根目錄中,並且必須命名`beep.wav`. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,157 @@ + + + + + + Notification + Cordova Notification Plugin + Apache 2.0 + cordova,notification + https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git + https://issues.apache.org/jira/browse/CB/component/12320642 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/android/Notification.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/android/Notification.java Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,483 @@ +/* + 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. +*/ +package org.apache.cordova.dialogs; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.annotation.SuppressLint; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; +import android.app.ProgressDialog; +import android.content.DialogInterface; +import android.media.Ringtone; +import android.media.RingtoneManager; +import android.net.Uri; +import android.widget.EditText; +import android.widget.TextView; + + +/** + * This class provides access to notifications on the device. + * + * Be aware that this implementation gets called on + * navigator.notification.{alert|confirm|prompt}, and that there is a separate + * implementation in org.apache.cordova.CordovaChromeClient that gets + * called on a simple window.{alert|confirm|prompt}. + */ +public class Notification extends CordovaPlugin { + + public int confirmResult = -1; + public ProgressDialog spinnerDialog = null; + public ProgressDialog progressDialog = null; + + /** + * Constructor. + */ + public Notification() { + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArray of arguments for the plugin. + * @param callbackContext The callback context used when calling back into JavaScript. + * @return True when the action was valid, false otherwise. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + /* + * Don't run any of these if the current activity is finishing + * in order to avoid android.view.WindowManager$BadTokenException + * crashing the app. Just return true here since false should only + * be returned in the event of an invalid action. + */ + if(this.cordova.getActivity().isFinishing()) return true; + + if (action.equals("beep")) { + this.beep(args.getLong(0)); + } + else if (action.equals("alert")) { + this.alert(args.getString(0), args.getString(1), args.getString(2), callbackContext); + return true; + } + else if (action.equals("confirm")) { + this.confirm(args.getString(0), args.getString(1), args.getJSONArray(2), callbackContext); + return true; + } + else if (action.equals("prompt")) { + this.prompt(args.getString(0), args.getString(1), args.getJSONArray(2), args.getString(3), callbackContext); + return true; + } + else if (action.equals("activityStart")) { + this.activityStart(args.getString(0), args.getString(1)); + } + else if (action.equals("activityStop")) { + this.activityStop(); + } + else if (action.equals("progressStart")) { + this.progressStart(args.getString(0), args.getString(1)); + } + else if (action.equals("progressValue")) { + this.progressValue(args.getInt(0)); + } + else if (action.equals("progressStop")) { + this.progressStop(); + } + else { + return false; + } + + // Only alert and confirm are async. + callbackContext.success(); + return true; + } + + //-------------------------------------------------------------------------- + // LOCAL METHODS + //-------------------------------------------------------------------------- + + /** + * Beep plays the default notification ringtone. + * + * @param count Number of times to play notification + */ + public void beep(final long count) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + Uri ringtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); + Ringtone notification = RingtoneManager.getRingtone(cordova.getActivity().getBaseContext(), ringtone); + + // If phone is not set to silent mode + if (notification != null) { + for (long i = 0; i < count; ++i) { + notification.play(); + long timeout = 5000; + while (notification.isPlaying() && (timeout > 0)) { + timeout = timeout - 100; + try { + Thread.sleep(100); + } catch (InterruptedException e) { + } + } + } + } + } + }); + } + + /** + * Builds and shows a native Android alert with given Strings + * @param message The message the alert should display + * @param title The title of the alert + * @param buttonLabel The label of the button + * @param callbackContext The callback context + */ + public synchronized void alert(final String message, final String title, final String buttonLabel, final CallbackContext callbackContext) { + final CordovaInterface cordova = this.cordova; + + Runnable runnable = new Runnable() { + public void run() { + + AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + dlg.setMessage(message); + dlg.setTitle(title); + dlg.setCancelable(true); + dlg.setPositiveButton(buttonLabel, + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0)); + } + }); + dlg.setOnCancelListener(new AlertDialog.OnCancelListener() { + public void onCancel(DialogInterface dialog) + { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0)); + } + }); + + changeTextDirection(dlg); + }; + }; + this.cordova.getActivity().runOnUiThread(runnable); + } + + /** + * Builds and shows a native Android confirm dialog with given title, message, buttons. + * This dialog only shows up to 3 buttons. Any labels after that will be ignored. + * The index of the button pressed will be returned to the JavaScript callback identified by callbackId. + * + * @param message The message the dialog should display + * @param title The title of the dialog + * @param buttonLabels A comma separated list of button labels (Up to 3 buttons) + * @param callbackContext The callback context. + */ + public synchronized void confirm(final String message, final String title, final JSONArray buttonLabels, final CallbackContext callbackContext) { + final CordovaInterface cordova = this.cordova; + + Runnable runnable = new Runnable() { + public void run() { + AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + dlg.setMessage(message); + dlg.setTitle(title); + dlg.setCancelable(true); + + // First button + if (buttonLabels.length() > 0) { + try { + dlg.setNegativeButton(buttonLabels.getString(0), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 1)); + } + }); + } catch (JSONException e) { } + } + + // Second button + if (buttonLabels.length() > 1) { + try { + dlg.setNeutralButton(buttonLabels.getString(1), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 2)); + } + }); + } catch (JSONException e) { } + } + + // Third button + if (buttonLabels.length() > 2) { + try { + dlg.setPositiveButton(buttonLabels.getString(2), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 3)); + } + }); + } catch (JSONException e) { } + } + dlg.setOnCancelListener(new AlertDialog.OnCancelListener() { + public void onCancel(DialogInterface dialog) + { + dialog.dismiss(); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0)); + } + }); + + changeTextDirection(dlg); + }; + }; + this.cordova.getActivity().runOnUiThread(runnable); + } + + /** + * Builds and shows a native Android prompt dialog with given title, message, buttons. + * This dialog only shows up to 3 buttons. Any labels after that will be ignored. + * The following results are returned to the JavaScript callback identified by callbackId: + * buttonIndex Index number of the button selected + * input1 The text entered in the prompt dialog box + * + * @param message The message the dialog should display + * @param title The title of the dialog + * @param buttonLabels A comma separated list of button labels (Up to 3 buttons) + * @param callbackContext The callback context. + */ + public synchronized void prompt(final String message, final String title, final JSONArray buttonLabels, final String defaultText, final CallbackContext callbackContext) { + + final CordovaInterface cordova = this.cordova; + + Runnable runnable = new Runnable() { + public void run() { + final EditText promptInput = new EditText(cordova.getActivity()); + promptInput.setHint(defaultText); + AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + dlg.setMessage(message); + dlg.setTitle(title); + dlg.setCancelable(true); + + dlg.setView(promptInput); + + final JSONObject result = new JSONObject(); + + // First button + if (buttonLabels.length() > 0) { + try { + dlg.setNegativeButton(buttonLabels.getString(0), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + try { + result.put("buttonIndex",1); + result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); + } catch (JSONException e) { e.printStackTrace(); } + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); + } + }); + } catch (JSONException e) { } + } + + // Second button + if (buttonLabels.length() > 1) { + try { + dlg.setNeutralButton(buttonLabels.getString(1), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + try { + result.put("buttonIndex",2); + result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); + } catch (JSONException e) { e.printStackTrace(); } + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); + } + }); + } catch (JSONException e) { } + } + + // Third button + if (buttonLabels.length() > 2) { + try { + dlg.setPositiveButton(buttonLabels.getString(2), + new AlertDialog.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + try { + result.put("buttonIndex",3); + result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); + } catch (JSONException e) { e.printStackTrace(); } + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); + } + }); + } catch (JSONException e) { } + } + dlg.setOnCancelListener(new AlertDialog.OnCancelListener() { + public void onCancel(DialogInterface dialog){ + dialog.dismiss(); + try { + result.put("buttonIndex",0); + result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText()); + } catch (JSONException e) { e.printStackTrace(); } + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); + } + }); + + changeTextDirection(dlg); + }; + }; + this.cordova.getActivity().runOnUiThread(runnable); + } + + /** + * Show the spinner. + * + * @param title Title of the dialog + * @param message The message of the dialog + */ + public synchronized void activityStart(final String title, final String message) { + if (this.spinnerDialog != null) { + this.spinnerDialog.dismiss(); + this.spinnerDialog = null; + } + final Notification notification = this; + final CordovaInterface cordova = this.cordova; + Runnable runnable = new Runnable() { + public void run() { + notification.spinnerDialog = createProgressDialog(cordova); // new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + notification.spinnerDialog.setTitle(title); + notification.spinnerDialog.setMessage(message); + notification.spinnerDialog.setCancelable(true); + notification.spinnerDialog.setIndeterminate(true); + notification.spinnerDialog.setOnCancelListener( + new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + notification.spinnerDialog = null; + } + }); + notification.spinnerDialog.show(); + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + } + + /** + * Stop spinner. + */ + public synchronized void activityStop() { + if (this.spinnerDialog != null) { + this.spinnerDialog.dismiss(); + this.spinnerDialog = null; + } + } + + /** + * Show the progress dialog. + * + * @param title Title of the dialog + * @param message The message of the dialog + */ + public synchronized void progressStart(final String title, final String message) { + if (this.progressDialog != null) { + this.progressDialog.dismiss(); + this.progressDialog = null; + } + final Notification notification = this; + final CordovaInterface cordova = this.cordova; + Runnable runnable = new Runnable() { + public void run() { + notification.progressDialog = createProgressDialog(cordova); // new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + notification.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); + notification.progressDialog.setTitle(title); + notification.progressDialog.setMessage(message); + notification.progressDialog.setCancelable(true); + notification.progressDialog.setMax(100); + notification.progressDialog.setProgress(0); + notification.progressDialog.setOnCancelListener( + new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + notification.progressDialog = null; + } + }); + notification.progressDialog.show(); + } + }; + this.cordova.getActivity().runOnUiThread(runnable); + } + + /** + * Set value of progress bar. + * + * @param value 0-100 + */ + public synchronized void progressValue(int value) { + if (this.progressDialog != null) { + this.progressDialog.setProgress(value); + } + } + + /** + * Stop progress dialog. + */ + public synchronized void progressStop() { + if (this.progressDialog != null) { + this.progressDialog.dismiss(); + this.progressDialog = null; + } + } + + @SuppressLint("NewApi") + private AlertDialog.Builder createDialog(CordovaInterface cordova) { + int currentapiVersion = android.os.Build.VERSION.SDK_INT; + if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) { + return new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + } else { + return new AlertDialog.Builder(cordova.getActivity()); + } + } + + @SuppressLint("InlinedApi") + private ProgressDialog createProgressDialog(CordovaInterface cordova) { + int currentapiVersion = android.os.Build.VERSION.SDK_INT; + if (currentapiVersion >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) { + return new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT); + } else { + return new ProgressDialog(cordova.getActivity()); + } + } + + @SuppressLint("NewApi") + private void changeTextDirection(Builder dlg){ + int currentapiVersion = android.os.Build.VERSION.SDK_INT; + dlg.create(); + AlertDialog dialog = dlg.show(); + if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { + TextView messageview = (TextView)dialog.findViewById(android.R.id.message); + messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE); + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/blackberry10/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,87 @@ +/* +* Copyright 2013 Research In Motion Limited. +* +* Licensed 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. +*/ + +function showDialog(args, dialogType, result) { + //Unpack and map the args + var msg = JSON.parse(decodeURIComponent(args[0])), + title = JSON.parse(decodeURIComponent(args[1])), + btnLabel = JSON.parse(decodeURIComponent(args[2])); + + if (!Array.isArray(btnLabel)) { + //Converts to array for (string) and (string,string, ...) cases + btnLabel = btnLabel.split(","); + } + + if (msg && typeof msg === "string") { + msg = msg.replace(/^"|"$/g, "").replace(/\\"/g, '"'); + } else { + result.error("message is undefined"); + return; + } + + var messageObj = { + title : title, + htmlmessage : msg, + dialogType : dialogType, + optionalButtons : btnLabel + }; + + //TODO replace with getOverlayWebview() when available in webplatform + qnx.webplatform.getWebViews()[2].dialog.show(messageObj, function (data) { + if (typeof data === "number") { + //Confirm dialog call back needs to be called with one-based indexing [1,2,3 etc] + result.callbackOk(++data, false); + } else { + //Prompt dialog callback expects object + result.callbackOk({ + buttonIndex: data.ok ? 1 : 0, + input1: (data.oktext) ? decodeURIComponent(data.oktext) : "" + }, false); + } + }); + + result.noResult(true); +} + +module.exports = { + alert: function (success, fail, args, env) { + var result = new PluginResult(args, env); + + if (Object.keys(args).length < 3) { + result.error("Notification action - alert arguments not found."); + } else { + showDialog(args, "CustomAsk", result); + } + }, + confirm: function (success, fail, args, env) { + var result = new PluginResult(args, env); + + if (Object.keys(args).length < 3) { + result.error("Notification action - confirm arguments not found."); + } else { + showDialog(args, "CustomAsk", result); + } + }, + prompt: function (success, fail, args, env) { + var result = new PluginResult(args, env); + + if (Object.keys(args).length < 3) { + result.error("Notification action - prompt arguments not found."); + } else { + showDialog(args, "JavaScriptPrompt", result); + } + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/firefoxos/notification.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/firefoxos/notification.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,154 @@ +/* + * + * 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. + * +*/ + +var modulemapper = require('cordova/modulemapper'); + + +var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open'); + + +function _empty() {} + + +function modal(message, callback, title, buttonLabels, domObjects) { + var mainWindow = window; + var modalWindow = origOpenFunc(); + var modalDocument = modalWindow.document; + + modalDocument.write( + '' + + '' + + '' + + ''); + + var box = modalDocument.createElement('form'); + box.setAttribute('role', 'dialog'); + // prepare and append empty section + var section = modalDocument.createElement('section'); + box.appendChild(section); + // add title + var boxtitle = modalDocument.createElement('h1'); + boxtitle.appendChild(modalDocument.createTextNode(title)); + section.appendChild(boxtitle); + // add message + var boxMessage = modalDocument.createElement('p'); + boxMessage.appendChild(modalDocument.createTextNode(message)); + section.appendChild(boxMessage); + // inject what's needed + if (domObjects) { + section.appendChild(domObjects); + } + // add buttons and assign callbackButton on click + var menu = modalDocument.createElement('menu'); + box.appendChild(menu); + for (var index = 0; index < buttonLabels.length; index++) { + addButton(buttonLabels[index], index, (index === 0)); + } + modalDocument.body.appendChild(box); + + function addButton(label, index, recommended) { + var thisButtonCallback = makeCallbackButton(index + 1); + var button = modalDocument.createElement('button'); + button.appendChild(modalDocument.createTextNode(label)); + button.addEventListener('click', thisButtonCallback, false); + if (recommended) { + // TODO: default one listens to Enter key + button.classList.add('recommend'); + } + menu.appendChild(button); + } + + // TODO: onUnload listens to the cancel key + function onUnload() { + var result = 0; + if (modalDocument.getElementById('prompt-input')) { + result = { + input1: '', + buttonIndex: 0 + } + } + mainWindow.setTimeout(function() { + callback(result); + }, 10); + }; + modalWindow.addEventListener('unload', onUnload, false); + + // call callback and destroy modal + function makeCallbackButton(labelIndex) { + return function() { + if (modalWindow) { + modalWindow.removeEventListener('unload', onUnload, false); + modalWindow.close(); + } + // checking if prompt + var promptInput = modalDocument.getElementById('prompt-input'); + var response; + if (promptInput) { + response = { + input1: promptInput.value, + buttonIndex: labelIndex + }; + } + response = response || labelIndex; + callback(response); + } + } +} + +var Notification = { + vibrate: function(milliseconds) { + navigator.vibrate(milliseconds); + }, + alert: function(successCallback, errorCallback, args) { + var message = args[0]; + var title = args[1]; + var _buttonLabels = [args[2]]; + var _callback = (successCallback || _empty); + modal(message, _callback, title, _buttonLabels); + }, + confirm: function(successCallback, errorCallback, args) { + var message = args[0]; + var title = args[1]; + var buttonLabels = args[2]; + var _callback = (successCallback || _empty); + modal(message, _callback, title, buttonLabels); + }, + prompt: function(successCallback, errorCallback, args) { + var message = args[0]; + var title = args[1]; + var buttonLabels = args[2]; + var defaultText = args[3]; + var inputParagraph = document.createElement('p'); + inputParagraph.classList.add('input'); + var inputElement = document.createElement('input'); + inputElement.setAttribute('type', 'text'); + inputElement.id = 'prompt-input'; + if (defaultText) { + inputElement.setAttribute('placeholder', defaultText); + } + inputParagraph.appendChild(inputElement); + modal(message, successCallback, title, buttonLabels, inputParagraph); + } +}; + + +module.exports = Notification; +require('cordova/exec/proxy').add('Notification', Notification); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.bundle/beep.wav Binary file Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.bundle/beep.wav has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,37 @@ +/* + 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. + */ + +#import +#import +#import +#import + +@interface CDVNotification : CDVPlugin {} + +- (void)alert:(CDVInvokedUrlCommand*)command; +- (void)confirm:(CDVInvokedUrlCommand*)command; +- (void)prompt:(CDVInvokedUrlCommand*)command; +- (void)beep:(CDVInvokedUrlCommand*)command; + +@end + +@interface CDVAlertView : UIAlertView {} +@property (nonatomic, copy) NSString* callbackId; + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,157 @@ +/* + 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. + */ + +#import "CDVNotification.h" +#import +#import + +#define DIALOG_TYPE_ALERT @"alert" +#define DIALOG_TYPE_PROMPT @"prompt" + +static void soundCompletionCallback(SystemSoundID ssid, void* data); + +@implementation CDVNotification + +/* + * showDialogWithMessage - Common method to instantiate the alert view for alert, confirm, and prompt notifications. + * Parameters: + * message The alert view message. + * title The alert view title. + * buttons The array of customized strings for the buttons. + * defaultText The input text for the textbox (if textbox exists). + * callbackId The commmand callback id. + * dialogType The type of alert view [alert | prompt]. + */ +- (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType +{ + CDVAlertView* alertView = [[CDVAlertView alloc] + initWithTitle:title + message:message + delegate:self + cancelButtonTitle:nil + otherButtonTitles:nil]; + + alertView.callbackId = callbackId; + + NSUInteger count = [buttons count]; + + for (int n = 0; n < count; n++) { + [alertView addButtonWithTitle:[buttons objectAtIndex:n]]; + } + + if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { + alertView.alertViewStyle = UIAlertViewStylePlainTextInput; + UITextField* textField = [alertView textFieldAtIndex:0]; + textField.text = defaultText; + } + + [alertView show]; +} + +- (void)alert:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSString* buttons = [command argumentAtIndex:2]; + + [self showDialogWithMessage:message title:title buttons:@[buttons] defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; +} + +- (void)confirm:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSArray* buttons = [command argumentAtIndex:2]; + + [self showDialogWithMessage:message title:title buttons:buttons defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; +} + +- (void)prompt:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSArray* buttons = [command argumentAtIndex:2]; + NSString* defaultText = [command argumentAtIndex:3]; + + [self showDialogWithMessage:message title:title buttons:buttons defaultText:defaultText callbackId:callbackId dialogType:DIALOG_TYPE_PROMPT]; +} + +/** + * Callback invoked when an alert dialog's buttons are clicked. + */ +- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex +{ + CDVAlertView* cdvAlertView = (CDVAlertView*)alertView; + CDVPluginResult* result; + + // Determine what gets returned to JS based on the alert view type. + if (alertView.alertViewStyle == UIAlertViewStyleDefault) { + // For alert and confirm, return button index as int back to JS. + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(buttonIndex + 1)]; + } else { + // For prompt, return button index and input text back to JS. + NSString* value0 = [[alertView textFieldAtIndex:0] text]; + NSDictionary* info = @{ + @"buttonIndex":@(buttonIndex + 1), + @"input1":(value0 ? value0 : [NSNull null]) + }; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; + } + [self.commandDelegate sendPluginResult:result callbackId:cdvAlertView.callbackId]; +} + +static void playBeep(int count) { + SystemSoundID completeSound; + NSInteger cbDataCount = count; + NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"]; + #if __has_feature(objc_arc) + AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound); + #else + AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound); + #endif + AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(cbDataCount-1)); + AudioServicesPlaySystemSound(completeSound); +} + +static void soundCompletionCallback(SystemSoundID ssid, void* data) { + int count = (int)data; + AudioServicesRemoveSystemSoundCompletion (ssid); + AudioServicesDisposeSystemSoundID(ssid); + if (count > 0) { + playBeep(count); + } +} + +- (void)beep:(CDVInvokedUrlCommand*)command +{ + NSNumber* count = [command.arguments objectAtIndex:0 withDefault:[NSNumber numberWithInt:1]]; + playBeep([count intValue]); +} + + +@end + +@implementation CDVAlertView + +@synthesize callbackId; + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,85 @@ +/* + * + * Licensed 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. + */ + +#include "notification.h" + +#include + +void Dialogs::beep(int scId, int ecId, int times) { + Q_UNUSED(scId) + Q_UNUSED(ecId) + Q_UNUSED(times) + + _player.setVolume(100); + _player.setMedia(QUrl::fromLocalFile("/usr/share/sounds/ubuntu/stereo/bell.ogg")); + _player.play(); +} + +void Dialogs::alert(int scId, int ecId, const QString &message, const QString &title, const QString &buttonLabel) { + QStringList list; + list.append(buttonLabel); + + confirm(scId, ecId, message, title, list); +} + +void Dialogs::confirm(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels) { + Q_UNUSED(ecId); + + if (_alertCallback) { + qCritical() << "can't open second dialog"; + return; + } + _alertCallback = scId; + + QString s1, s2, s3; + if (buttonLabels.size() > 0) + s1 = buttonLabels[0]; + if (buttonLabels.size() > 1) + s2 = buttonLabels[1]; + if (buttonLabels.size() > 2) + s3 = buttonLabels[2]; + + QString path = m_cordova->get_app_dir() + "/../qml/notification.qml"; + QString qml = QString("PopupUtils.open(%1, root, { root: root, cordova: cordova, title: %2, text: %3, promptVisible: false, button1Text: %4, button2Text: %5, button3Text: %6 })") + .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(title)).arg(CordovaInternal::format(message)) + .arg(CordovaInternal::format(s1)).arg(CordovaInternal::format(s2)).arg(CordovaInternal::format(s3)); + + m_cordova->execQML(qml); +} + +void Dialogs::prompt(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels, const QString &defaultText) { + Q_UNUSED(ecId); + + if (_alertCallback) { + qCritical() << "can't open second dialog"; + return; + } + _alertCallback = scId; + + QString s1, s2, s3; + if (buttonLabels.size() > 0) + s1 = buttonLabels[0]; + if (buttonLabels.size() > 1) + s2 = buttonLabels[1]; + if (buttonLabels.size() > 2) + s3 = buttonLabels[2]; + QString path = m_cordova->get_app_dir() + "/../qml/notification.qml"; + QString qml = QString("PopupUtils.open(%1, root, { root: root, cordova: cordova, title: %2, text: %3, promptVisible: true, defaultPromptText: %7, button1Text: %4, button2Text: %5, button3Text: %6 })") + .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(title)).arg(CordovaInternal::format(message)) + .arg(CordovaInternal::format(s1)).arg(CordovaInternal::format(s2)) + .arg(CordovaInternal::format(s3)).arg(CordovaInternal::format(defaultText)); + + m_cordova->execQML(qml); +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,64 @@ +/* + * + * Licensed 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. + */ + +#ifndef NOTIFICATION_H +#define NOTIFICATION_H + +#include +#include +#include +#include + +class Dialogs: public CPlugin { + Q_OBJECT +public: + explicit Dialogs(Cordova *cordova): CPlugin(cordova), _alertCallback(0) { + } + + virtual const QString fullName() override { + return Dialogs::fullID(); + } + + virtual const QString shortName() override { + return "Notification"; + } + + static const QString fullID() { + return "Notification"; + } +public slots: + void beep(int scId, int ecId, int times); + void alert(int scId, int ecId, const QString &message, const QString &title, const QString &buttonLabel); + void confirm(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels); + void prompt(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels, const QString &defaultText); + + void notificationDialogButtonPressed(int buttonId, const QString &text, bool prompt) { + if (prompt) { + QVariantMap res; + res.insert("buttonIndex", buttonId); + res.insert("input1", text); + this->cb(_alertCallback, res); + } else { + this->cb(_alertCallback, buttonId); + } + _alertCallback = 0; + } + +private: + int _alertCallback; + QMediaPlayer _player; +}; + +#endif diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.qml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.qml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,65 @@ +/* + * + * 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. + * +*/ + +import QtQuick 2.0 +import Ubuntu.Components.Popups 0.1 +import Ubuntu.Components 0.1 + +Dialog { + id: dialogue + property string button1Text + property string button2Text + property string button3Text + property bool promptVisible + property string defaultPromptText + + TextField { + id: prompt + text: defaultPromptText + visible: promptVisible + focus: true + } + Button { + text: button1Text + color: "orange" + onClicked: { + root.exec("Notification", "notificationDialogButtonPressed", [1, prompt.text, promptVisible]); + PopupUtils.close(dialogue) + } + } + Button { + text: button2Text + visible: button2Text.length > 0 + color: "orange" + onClicked: { + root.exec("Notification", "notificationDialogButtonPressed", [2, prompt.text, promptVisible]); + PopupUtils.close(dialogue) + } + } + Button { + text: button3Text + visible: button3Text.length > 0 + onClicked: { + root.exec("Notification", "notificationDialogButtonPressed", [3, prompt.text, promptVisible]); + PopupUtils.close(dialogue) + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/windows8/NotificationProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/windows8/NotificationProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,126 @@ +/* + * + * 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. + * +*/ + +/*global Windows:true */ + +var cordova = require('cordova'); + +var isAlertShowing = false; +var alertStack = []; + +module.exports = { + alert:function(win, loseX, args) { + + if (isAlertShowing) { + var later = function () { + module.exports.alert(win, loseX, args); + }; + alertStack.push(later); + return; + } + isAlertShowing = true; + + var message = args[0]; + var _title = args[1]; + var _buttonLabel = args[2]; + + var md = new Windows.UI.Popups.MessageDialog(message, _title); + md.commands.append(new Windows.UI.Popups.UICommand(_buttonLabel)); + md.showAsync().then(function() { + isAlertShowing = false; + win && win(); + + if (alertStack.length) { + setTimeout(alertStack.shift(), 0); + } + + }); + }, + + confirm:function(win, loseX, args) { + + if (isAlertShowing) { + var later = function () { + module.exports.confirm(win, loseX, args); + }; + alertStack.push(later); + return; + } + + isAlertShowing = true; + + try { + var message = args[0]; + var _title = args[1]; + var buttons = args[2]; + + var md = new Windows.UI.Popups.MessageDialog(message, _title); + + buttons.forEach(function(buttonLabel) { + md.commands.append(new Windows.UI.Popups.UICommand(buttonLabel)); + }); + + md.showAsync().then(function(res) { + isAlertShowing = false; + var result = res ? buttons.indexOf(res.label) + 1 : 0; + win && win(result); + if (alertStack.length) { + setTimeout(alertStack.shift(), 0); + } + + }); + } catch (e) { + // set isAlertShowing flag back to false in case of exception + isAlertShowing = false; + if (alertStack.length) { + setTimeout(alertStack.shift(), 0); + } + // rethrow exception + throw e; + } + }, + + beep:function(winX, loseX, args) { + + // set a default args if it is not set + args = args && args.length ? args : ["1"]; + + var snd = new Audio('ms-winsoundevent:Notification.Default'); + var count = parseInt(args[0]) || 1; + snd.msAudioCategory = "Alerts"; + + var onEvent = function () { + if (count > 0) { + snd.play(); + } else { + snd.removeEventListener("ended", onEvent); + snd = null; + winX && winX(); // notification.js just sends null, but this is future friendly + } + count--; + }; + snd.addEventListener("ended", onEvent); + onEvent(); + + } +}; + +require("cordova/exec/proxy").add("Notification",module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/Notification.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/Notification.cs Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,482 @@ +/* + Licensed 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. +*/ + +using System; +using System.Windows; +using System.Windows.Controls; +using Microsoft.Devices; +using System.Runtime.Serialization; +using System.Threading; +using System.Windows.Resources; +using Microsoft.Phone.Controls; +using Microsoft.Xna.Framework.Audio; +using WPCordovaClassLib.Cordova.UI; +using System.Diagnostics; + + +namespace WPCordovaClassLib.Cordova.Commands +{ + public class Notification : BaseCommand + { + static ProgressBar progressBar = null; + const int DEFAULT_DURATION = 5; + + private NotificationBox notifyBox; + + private class NotifBoxData + { + public NotificationBox previous {get;set;} + public string callbackId { get; set; } + } + + private PhoneApplicationPage Page + { + get + { + PhoneApplicationPage page = null; + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + page = frame.Content as PhoneApplicationPage; + } + return page; + } + } + + // blink api - doesn't look like there is an equivalent api we can use... + + [DataContract] + public class AlertOptions + { + [OnDeserializing] + public void OnDeserializing(StreamingContext context) + { + // set defaults + this.message = "message"; + this.title = "Alert"; + this.buttonLabel = "ok"; + } + + /// + /// message to display in the alert box + /// + [DataMember] + public string message; + + /// + /// title displayed on the alert window + /// + [DataMember] + public string title; + + /// + /// text to display on the button + /// + [DataMember] + public string buttonLabel; + } + + [DataContract] + public class PromptResult + { + [DataMember] + public int buttonIndex; + + [DataMember] + public string input1; + + public PromptResult(int index, string text) + { + this.buttonIndex = index; + this.input1 = text; + } + } + + public void alert(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + AlertOptions alertOpts = new AlertOptions(); + alertOpts.message = args[0]; + alertOpts.title = args[1]; + alertOpts.buttonLabel = args[2]; + string aliasCurrentCommandCallbackId = args[3]; + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationPage page = Page; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + var previous = notifyBox; + notifyBox = new NotificationBox(); + notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId }; + notifyBox.PageTitle.Text = alertOpts.title; + notifyBox.SubTitle.Text = alertOpts.message; + Button btnOK = new Button(); + btnOK.Content = alertOpts.buttonLabel; + btnOK.Click += new RoutedEventHandler(btnOK_Click); + btnOK.Tag = 1; + notifyBox.ButtonPanel.Children.Add(btnOK); + grid.Children.Add(notifyBox); + + if (previous == null) + { + page.BackKeyPress += page_BackKeyPress; + } + } + } + else + { + DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION)); + } + }); + } + + public void prompt(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + string message = args[0]; + string title = args[1]; + string buttonLabelsArray = args[2]; + string[] buttonLabels = JSON.JsonHelper.Deserialize(buttonLabelsArray); + string defaultText = args[3]; + string aliasCurrentCommandCallbackId = args[4]; + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationPage page = Page; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + var previous = notifyBox; + notifyBox = new NotificationBox(); + notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId }; + notifyBox.PageTitle.Text = title; + notifyBox.SubTitle.Text = message; + + //TextBox textBox = new TextBox(); + //textBox.Text = defaultText; + //textBox.AcceptsReturn = true; + //notifyBox.ContentScroller.Content = textBox; + + notifyBox.InputText.Text = defaultText; + notifyBox.InputText.Visibility = Visibility.Visible; + + for (int i = 0; i < buttonLabels.Length; ++i) + { + Button button = new Button(); + button.Content = buttonLabels[i]; + button.Tag = i + 1; + button.Click += promptBoxbutton_Click; + notifyBox.ButtonPanel.Orientation = Orientation.Vertical; + notifyBox.ButtonPanel.Children.Add(button); + } + + grid.Children.Add(notifyBox); + if (previous != null) + { + page.BackKeyPress += page_BackKeyPress; + } + } + } + else + { + DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION)); + } + }); + } + + public void confirm(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + AlertOptions alertOpts = new AlertOptions(); + alertOpts.message = args[0]; + alertOpts.title = args[1]; + alertOpts.buttonLabel = args[2]; + string aliasCurrentCommandCallbackId = args[3]; + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationPage page = Page; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + var previous = notifyBox; + notifyBox = new NotificationBox(); + notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId }; + notifyBox.PageTitle.Text = alertOpts.title; + notifyBox.SubTitle.Text = alertOpts.message; + + string[] labels = JSON.JsonHelper.Deserialize(alertOpts.buttonLabel); + + if (labels == null) + { + labels = alertOpts.buttonLabel.Split(','); + } + + for (int n = 0; n < labels.Length; n++) + { + Button btn = new Button(); + btn.Content = labels[n]; + btn.Tag = n; + btn.Click += new RoutedEventHandler(btnOK_Click); + notifyBox.ButtonPanel.Children.Add(btn); + } + + grid.Children.Add(notifyBox); + if (previous == null) + { + page.BackKeyPress += page_BackKeyPress; + } + } + } + else + { + DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION)); + } + }); + } + + void promptBoxbutton_Click(object sender, RoutedEventArgs e) + { + Button button = sender as Button; + FrameworkElement promptBox = null; + int buttonIndex = 0; + string callbackId = string.Empty; + string text = string.Empty; + if (button != null) + { + buttonIndex = (int)button.Tag; + promptBox = button.Parent as FrameworkElement; + while ((promptBox = promptBox.Parent as FrameworkElement) != null && + !(promptBox is NotificationBox)) ; + } + + if (promptBox != null) + { + NotificationBox box = promptBox as NotificationBox; + + text = box.InputText.Text; + + PhoneApplicationPage page = Page; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(promptBox); + } + + NotifBoxData data = promptBox.Tag as NotifBoxData; + promptBox = data.previous as NotificationBox; + callbackId = data.callbackId as string; + + if (promptBox == null) + { + page.BackKeyPress -= page_BackKeyPress; + } + } + } + DispatchCommandResult(new PluginResult(PluginResult.Status.OK, new PromptResult(buttonIndex, text)), callbackId); + } + + void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) + { + PhoneApplicationPage page = sender as PhoneApplicationPage; + string callbackId = ""; + if (page != null && notifyBox != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(notifyBox); + NotifBoxData notifBoxData = notifyBox.Tag as NotifBoxData; + notifyBox = notifBoxData.previous as NotificationBox; + callbackId = notifBoxData.callbackId as string; + } + if (notifyBox == null) + { + page.BackKeyPress -= page_BackKeyPress; + } + e.Cancel = true; + } + + DispatchCommandResult(new PluginResult(PluginResult.Status.OK, 0), callbackId); + } + + void btnOK_Click(object sender, RoutedEventArgs e) + { + Button btn = sender as Button; + FrameworkElement notifBoxParent = null; + int retVal = 0; + string callbackId = ""; + if (btn != null) + { + retVal = (int)btn.Tag + 1; + + notifBoxParent = btn.Parent as FrameworkElement; + while ((notifBoxParent = notifBoxParent.Parent as FrameworkElement) != null && + !(notifBoxParent is NotificationBox)) ; + } + if (notifBoxParent != null) + { + PhoneApplicationPage page = Page; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(notifBoxParent); + } + + NotifBoxData notifBoxData = notifBoxParent.Tag as NotifBoxData; + notifyBox = notifBoxData.previous as NotificationBox; + callbackId = notifBoxData.callbackId as string; + + if (notifyBox == null) + { + page.BackKeyPress -= page_BackKeyPress; + } + } + + } + DispatchCommandResult(new PluginResult(PluginResult.Status.OK, retVal), callbackId); + } + + + + public void beep(string options) + { + string[] args = JSON.JsonHelper.Deserialize(options); + int times = int.Parse(args[0]); + + string resourcePath = BaseCommand.GetBaseURL() + "Plugins/org.apache.cordova.dialogs/notification-beep.wav"; + + StreamResourceInfo sri = Application.GetResourceStream(new Uri(resourcePath, UriKind.Relative)); + + if (sri != null) + { + SoundEffect effect = SoundEffect.FromStream(sri.Stream); + SoundEffectInstance inst = effect.CreateInstance(); + ThreadPool.QueueUserWorkItem((o) => + { + // cannot interact with UI !! + do + { + inst.Play(); + Thread.Sleep(effect.Duration + TimeSpan.FromMilliseconds(100)); + } + while (--times > 0); + + }); + + } + + // TODO: may need a listener to trigger DispatchCommandResult after the alarm has finished executing... + DispatchCommandResult(); + } + + // Display an indeterminate progress indicator + public void activityStart(string unused) + { + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + + if (page != null) + { + var temp = page.FindName("LayoutRoot"); + Grid grid = temp as Grid; + if (grid != null) + { + if (progressBar != null) + { + grid.Children.Remove(progressBar); + } + progressBar = new ProgressBar(); + progressBar.IsIndeterminate = true; + progressBar.IsEnabled = true; + + grid.Children.Add(progressBar); + } + } + } + }); + } + + + // Remove our indeterminate progress indicator + public void activityStop(string unused) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (progressBar != null) + { + progressBar.IsEnabled = false; + PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; + if (frame != null) + { + PhoneApplicationPage page = frame.Content as PhoneApplicationPage; + if (page != null) + { + Grid grid = page.FindName("LayoutRoot") as Grid; + if (grid != null) + { + grid.Children.Remove(progressBar); + } + } + } + progressBar = null; + } + }); + } + + public void vibrate(string vibrateDuration) + { + + int msecs = 200; // set default + + try + { + string[] args = JSON.JsonHelper.Deserialize(vibrateDuration); + + msecs = int.Parse(args[0]); + if (msecs < 1) + { + msecs = 1; + } + } + catch (FormatException) + { + + } + + VibrateController.Default.Start(TimeSpan.FromMilliseconds(msecs)); + + // TODO: may need to add listener to trigger DispatchCommandResult when the vibration ends... + DispatchCommandResult(); + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml.cs Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,41 @@ +/* + 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. +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; + +namespace WPCordovaClassLib.Cordova.UI +{ + public partial class NotificationBox : UserControl + { + public NotificationBox() + { + InitializeComponent(); + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/notification-beep.wav Binary file Touchgui/plugins/org.apache.cordova.dialogs/src/wp/notification-beep.wav has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/tests/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,29 @@ + + + + + Cordova Notification Plugin Tests + Apache 2.0 + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/tests/tests.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/tests/tests.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,194 @@ +/* + * + * 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. + * +*/ + +exports.defineAutoTests = function () { + describe('Notification (navigator.notification)', function () { + it("should exist", function () { + expect(navigator.notification).toBeDefined(); + }); + + it("should contain a beep function", function () { + expect(typeof navigator.notification.beep).toBeDefined(); + expect(typeof navigator.notification.beep).toBe("function"); + }); + + it("should contain an alert function", function () { + expect(typeof navigator.notification.alert).toBeDefined(); + expect(typeof navigator.notification.alert).toBe("function"); + }); + + it("should contain a confirm function", function () { + expect(typeof navigator.notification.confirm).toBeDefined(); + expect(typeof navigator.notification.confirm).toBe("function"); + }); + + it("should contain a prompt function", function () { + expect(typeof navigator.notification.prompt).toBeDefined(); + expect(typeof navigator.notification.prompt).toBe("function"); + }); + }); +}; + +/******************************************************************************/ +/******************************************************************************/ +/******************************************************************************/ + +exports.defineManualTests = function (contentEl, createActionButton) { + var logMessage = function (message) { + var log = document.getElementById('info'); + 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()"); + navigator.notification.beep(3); + }; + + var alertDialog = function (message, title, button) { + console.log("alertDialog()"); + navigator.notification.alert(message, + function () { + console.log("Alert dismissed."); + }, + title, button); + console.log("After alert"); + }; + + var confirmDialogA = function (message, title, buttons) { + clearLog(); + navigator.notification.confirm(message, + function (r) { + if (r === 0) { + logMessage("Dismissed dialog without making a selection."); + console.log("Dismissed dialog without making a selection."); + } else { + console.log("You selected " + r); + logMessage("You selected " + (buttons.split(","))[r - 1]); + } + }, + title, + buttons); + }; + + var confirmDialogB = function (message, title, buttons) { + clearLog(); + navigator.notification.confirm(message, + function (r) { + if (r === 0) { + logMessage("Dismissed dialog without making a selection."); + console.log("Dismissed dialog without making a selection."); + } else { + console.log("You selected " + r); + logMessage("You selected " + buttons[r - 1]); + } + }, + title, + buttons); + }; + + var promptDialog = function (message, title, buttons) { + clearLog(); + navigator.notification.prompt(message, + function (r) { + if (r && r.buttonIndex === 0) { + var msg = "Dismissed dialog"; + if (r.input1) { + msg += " with input: " + r.input1 + } + logMessage(msg); + console.log(msg); + } else { + console.log("You selected " + r.buttonIndex + " and entered: " + r.input1); + logMessage("You selected " + buttons[r.buttonIndex - 1] + " and entered: " + r.input1); + } + }, + title, + buttons); + }; + + /******************************************************************************/ + + var dialogs_tests = '
' + + 'Expected result: Device will beep (unless device is on silent). Nothing will get updated in status box.' + + '

Dialog Tests

' + + '

Dialog boxes will pop up for each of the following tests

' + + '

' + + 'Expected result: Dialog will say "You pressed alert". Press continue to close dialog. Nothing will get updated in status box.' + + '

' + + 'Expected result: Dialog will say "You pressed confirm". Press Yes, No, or Maybe to close dialog. Status box will tell you what option you selected.' + + '

' + + '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 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.'; + + contentEl.innerHTML = '
' + + dialogs_tests; + + createActionButton('Beep', function () { + beep(); + }, 'beep'); + + createActionButton('Alert Dialog', function () { + alertDialog('You pressed alert.', 'Alert Dialog', 'Continue'); + }, 'alert'); + + // WP8.1 detection is necessary since it doesn't support confirm dialogs with more than 2 buttons + var isRunningOnWP81 = cordova.platformId == "windows" && navigator.userAgent.indexOf('Windows Phone') > -1; + + createActionButton('Confirm Dialog - Deprecated', function () { + var buttons = isRunningOnWP81 ? 'Yes,No' : 'Yes,No,Maybe'; + confirmDialogA('You pressed confirm.', 'Confirm Dialog', buttons); + }, 'confirm_deprecated'); + + createActionButton('Confirm Dialog', function () { + var buttons = isRunningOnWP81 ? ['Yes', 'Actually, No'] : ['Yes', 'No', 'Maybe, Not Sure']; + confirmDialogB('You pressed confirm.', 'Confirm Dialog', buttons); + }, 'confirm'); + + createActionButton('Prompt Dialog', function () { + promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']); + }, 'prompt'); + + createActionButton('Built-in Alert Dialog', function () { + typeof alert === 'function' && alert('You pressed alert'); + }, 'built_in_alert'); + + createActionButton('Built-in Confirm Dialog', function () { + 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'); + }, 'built_in_prompt'); +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/android/notification.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/android/notification.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,74 @@ +/* + * + * 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. + * +*/ + +var exec = require('cordova/exec'); + +/** + * Provides Android enhanced notification API. + */ +module.exports = { + activityStart : function(title, message) { + // If title and message not specified then mimic Android behavior of + // using default strings. + if (typeof title === "undefined" && typeof message == "undefined") { + title = "Busy"; + message = 'Please wait...'; + } + + exec(null, null, 'Notification', 'activityStart', [ title, message ]); + }, + + /** + * Close an activity dialog + */ + activityStop : function() { + exec(null, null, 'Notification', 'activityStop', []); + }, + + /** + * Display a progress dialog with progress bar that goes from 0 to 100. + * + * @param {String} + * title Title of the progress dialog. + * @param {String} + * message Message to display in the dialog. + */ + progressStart : function(title, message) { + exec(null, null, 'Notification', 'progressStart', [ title, message ]); + }, + + /** + * Close the progress dialog. + */ + progressStop : function() { + exec(null, null, 'Notification', 'progressStop', []); + }, + + /** + * Set the progress dialog value. + * + * @param {Number} + * value 0-100 + */ + progressValue : function(value) { + exec(null, null, 'Notification', 'progressValue', [ value ]); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/beep.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/beep.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,42 @@ +/* + * + * 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. + * +*/ + +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/org.apache.cordova.dialogs/notification-beep.wav'); + beepObj.addEventListener("ended", callback); + beepObj.play(); + }, + callback = function () { + if (--count > 0) { + play(); + } else { + delete beepObj; + } + }; + count += quantity || 1; + if (count > 0) { + play(); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/notification-beep.wav Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/notification-beep.wav has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger-press.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger-press.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/default.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/default.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/gradient.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/gradient.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/notification.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/notification.css Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,248 @@ +/* + * + * 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. + * +*/ + +/* Main dialog setup */ +form[role="dialog"] { + background: + url(../img/pattern.png) repeat left top, + url(../img/gradient.png) no-repeat left top / 100% 100%; + overflow: hidden; + position: absolute; + z-index: 100; + top: 0; + left: 0; + right: 0; + bottom: 0; + padding: 1.5rem 0 7rem; + font-family: "MozTT", Sans-serif; + font-size: 0; + /* Using font-size: 0; we avoid the unwanted visual space (about 3px) + created by white-spaces and break lines in the code betewen inline-block elements */ + color: #fff; + text-align: left; +} + +form[role="dialog"]:before { + content: ""; + display: inline-block; + vertical-align: middle; + width: 0.1rem; + height: 100%; + margin-left: -0.1rem; +} + +form[role="dialog"] > section { + font-weight: lighter; + font-size: 1.8rem; + color: #FAFAFA; + padding: 0 1.5rem; + -moz-box-sizing: padding-box; + width: 100%; + display: inline-block; + overflow-y: scroll; + max-height: 100%; + vertical-align: middle; + white-space: normal; +} + +form[role="dialog"] h1 { + font-weight: normal; + font-size: 1.6rem; + line-height: 1.5em; + color: #fff; + margin: 0; + padding: 0 1.5rem 1rem; + border-bottom: 0.1rem solid #686868; +} + +/* Menu & buttons setup */ +form[role="dialog"] menu { + margin: 0; + padding: 1.5rem; + padding-bottom: 0.5rem; + border-top: solid 0.1rem rgba(255, 255, 255, 0.1); + background: #2d2d2d url(../img/pattern.png) repeat left top; + display: block; + overflow: hidden; + position: absolute; + left: 0; + right: 0; + bottom: 0; + text-align: center; +} + +form[role="dialog"] menu button::-moz-focus-inner { + border: none; + outline: none; +} +form[role="dialog"] menu button { + width: 100%; + height: 2.4rem; + margin: 0 0 1rem; + padding: 0 1.5rem; + -moz-box-sizing: border-box; + display: inline-block; + vertical-align: middle; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + background: #fafafa url(../img/default.png) repeat-x left bottom/ auto 100%; + border: 0.1rem solid #a6a6a6; + border-radius: 0.3rem; + font: 500 1.2rem/2.4rem 'MozTT', Sans-serif; + color: #333; + text-align: center; + text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3); + text-decoration: none; + outline: none; +} + +/* Press (default & recommend) */ +form[role="dialog"] menu button:active, +form[role="dialog"] menu button.recommend:active, +a.recommend[role="button"]:active { + border-color: #008aaa; + color: #333; +} + +/* Recommend */ +form[role="dialog"] menu button.recommend { + background-image: url(../img/recommend.png); + background-color: #00caf2; + border-color: #008eab; +} + +/* Danger */ +form[role="dialog"] menu button.danger, +a.danger[role="button"] { + background-image: url(../img/danger.png); + background-color: #b70404; + color: #fff; + text-shadow: none; + border-color: #820000; +} + +/* Danger Press */ +form[role="dialog"] menu button.danger:active { + background-image: url(../img/danger-press.png); + background-color: #890707; +} + +/* Disabled */ +form[role="dialog"] > menu > button[disabled] { + background: #5f5f5f; + color: #4d4d4d; + text-shadow: none; + border-color: #4d4d4d; + pointer-events: none; +} + + +form[role="dialog"] menu button:nth-child(even) { + margin-left: 1rem; +} + +form[role="dialog"] menu button, +form[role="dialog"] menu button:nth-child(odd) { + margin: 0 0 1rem 0; +} + +form[role="dialog"] menu button { + width: calc((100% - 1rem) / 2); +} + +form[role="dialog"] menu button.full { + width: 100%; +} + +/* Specific component code */ +form[role="dialog"] p { + word-wrap: break-word; + margin: 1rem 0 0; + padding: 0 1.5rem 1rem; + line-height: 3rem; +} + +form[role="dialog"] p img { + float: left; + margin-right: 2rem; +} + +form[role="dialog"] p strong { + font-weight: lighter; +} + +form[role="dialog"] p small { + font-size: 1.4rem; + font-weight: normal; + color: #cbcbcb; + display: block; +} + +form[role="dialog"] dl { + border-top: 0.1rem solid #686868; + margin: 1rem 0 0; + overflow: hidden; + padding-top: 1rem; + font-size: 1.6rem; + line-height: 2.2rem; +} + +form[role="dialog"] dl > dt { + clear: both; + float: left; + width: 7rem; + padding-left: 1.5rem; + font-weight: 500; + text-align: left; +} + +form[role="dialog"] dl > dd { + padding-right: 1.5rem; + font-weight: 300; + text-overflow: ellipsis; + vertical-align: top; + overflow: hidden; +} + +/* input areas */ +input[type="text"], +input[type="password"], +input[type="email"], +input[type="tel"], +input[type="search"], +input[type="url"], +input[type="number"], +textarea { + -moz-box-sizing: border-box; + display: block; + overflow: hidden; + width: 100%; + height: 3rem; + resize: none; + padding: 0 1rem; + font-size: 1.6rem; + line-height: 3rem; + border: 0.1rem solid #ccc; + border-radius: 0.3rem; + box-shadow: none; /* override the box-shadow from the system (performance issue) */ + background: #fff url(input_areas/images/ui/shadow.png) repeat-x; +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/pattern.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/pattern.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/recommend.png Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/recommend.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/notification.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/notification.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,112 @@ +/* + * + * 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. + * +*/ + +var exec = require('cordova/exec'); +var platform = require('cordova/platform'); + +/** + * Provides access to notifications on the device. + */ + +module.exports = { + + /** + * Open a native alert dialog, with a customizable title and button text. + * + * @param {String} message Message to print in the body of the alert + * @param {Function} completeCallback The callback that is called when user clicks on a button. + * @param {String} title Title of the alert dialog (default: Alert) + * @param {String} buttonLabel Label of the close button (default: OK) + */ + alert: function(message, completeCallback, title, buttonLabel) { + var _title = (title || "Alert"); + var _buttonLabel = (buttonLabel || "OK"); + exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]); + }, + + /** + * Open a native confirm dialog, with a customizable title and button text. + * The result that the user selects is returned to the result callback. + * + * @param {String} message Message to print in the body of the alert + * @param {Function} resultCallback The callback that is called when user clicks on a button. + * @param {String} title Title of the alert dialog (default: Confirm) + * @param {Array} buttonLabels Array of the labels of the buttons (default: ['OK', 'Cancel']) + */ + confirm: function(message, resultCallback, title, buttonLabels) { + var _title = (title || "Confirm"); + var _buttonLabels = (buttonLabels || ["OK", "Cancel"]); + + // Strings are deprecated! + if (typeof _buttonLabels === 'string') { + 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]); + }, + + /** + * Open a native prompt dialog, with a customizable title and button text. + * The following results are returned to the result callback: + * buttonIndex Index number of the button selected. + * input1 The text entered in the prompt dialog box. + * + * @param {String} message Dialog message to display (default: "Prompt message") + * @param {Function} resultCallback The callback that is called when user clicks on a button. + * @param {String} title Title of the dialog (default: "Prompt") + * @param {Array} buttonLabels Array of strings for the button labels (default: ["OK","Cancel"]) + * @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 _buttonLabels = (buttonLabels || ["OK","Cancel"]); + var _defaultText = (defaultText || ""); + exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]); + }, + + /** + * Causes the device to beep. + * On Android, the default notification ringtone is played "count" times. + * + * @param {Integer} count The number of beeps. + */ + beep: function(count) { + var defaultedCount = count || 1; + exec(null, null, "Notification", "beep", [ defaultedCount ]); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/.fetch.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/.fetch.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,1 @@ +{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.splashscreen"}} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/CONTRIBUTING.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +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). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/LICENSE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/NOTICE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/NOTICE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,22 @@ + + +# org.apache.cordova.splashscreen + +Plugin documentation: [doc/index.md](doc/index.md) diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/RELEASENOTES.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,100 @@ + +# Release Notes + +### 0.2.2 (Sept 25, 2013) +* CB-4889 bumping&resetting version +* CB-4889 renaming org.apache.cordova.core.splashscreen to org.apache.cordova.splashscreen +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4806] Update splashscreen image bounds for iOS 7 +* [CB-4752] Incremented plugin version on dev branch. + +### 0.2.3 (Oct 9, 2013) +* [CB-4806] Re-fix Update splashscreen image bounds for iOS 7 +* [CB-4934] plugin-splashscreen should not show by default on Windows8 +* [CB-4929] plugin-splashscreen not loading proxy windows8 +* [CB-4915] Incremented plugin version on dev branch. + +### 0.2.4 (Oct 28, 2013) +* CB-5128: add repo + issue tag to plugin.xml for splashscreen plugin +* [CB-5010] Incremented plugin version on dev branch. + +### 0.2.5 (Dec 4, 2013) +* add ubuntu platform +* Added amazon-fireos platform. Change to use amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos' +* CB-5124 - Remove splashscreen config.xml values from iOS Configuration Docs, move to plugin docs + +### 0.2.6 (Jan 02, 2014) +* CB-5658 Add doc/index.md for Splashscreen plugin +* Handle error when splash image is missing. + +### 0.2.7 (Feb 05, 2014) +* [CB-3562] Fix aspect ratio on landscape-only iPhone applications +* CB-4051 fix for splashscreen rotation problem + +### 0.3.0 (Apr 17, 2014) +* Add Tizen support to plugin +* CB-6422: [windows8] use cordova/exec/proxy +* CB-4051: [ios] - Re-fix - Splashscreen rotation problem (closes #13) +* CB-6460: Update license headers +* CB-6465: Add license headers to Tizen code +* Add NOTICE file + +### 0.3.1 (Jun 05, 2014) +* documentation translation: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* CB-6810 Add license to CONTRIBUTING.md +* [wp8] updated quirk for and combined iOS,WP8,BB10 quirks as they are all the same +* [wp] implemented OnInit so splash screen can be shown before cordova page is loaded +* [wp] plugin must be autoloaded for AutoHideSplashScreen preference to work +* CB-6483 Use splash screen image from manifest on Windows8 +* CB-6491 add CONTRIBUTING.md +* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen" + +### 0.3.2 (Aug 06, 2014) +* CB-6127 Updated translations for docs +* CB-7041 ios: Fix image filename logic when setting the iPad splash screen +* fixes Splashscreen crash on WP8 +* Remove outdated doc + +### 0.3.3 (Sep 17, 2014) +* CB-7249 cordova-plugin-splashscreen documentation translation +* Renamed test dir, added nested plugin.xml +* added documentation for manual tests +* CB-7196 port splashscreen tests to framework + +### 0.3.4 (Oct 03, 2014) +* Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus). +* CB-7633 - (Re-fix based on updated unit tests) iPhone 6 Plus support +* Updated iOS tests for locked orientations +* Added more iOS splash screen tests. +* CB-7633 - Add support for iPhone 6/6+ +* Added failing iPhone 6/6 Plus tests. +* Added 'npm test' +* CB-7663 - iOS unit tests for splash screen +* Properly formatted splashscreen preference docs. + +### 0.3.5 (Dec 02, 2014) +* CB-7204 - Race condition when hiding and showing spinner (closes #21) +* CB-7700 cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/de/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung. + +## Installation + + cordova plugin add org.apache.cordova.splashscreen + + +## Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 und 8 +* Windows 8 + +## Methoden + +* SplashScreen.Show +* SplashScreen.Hide + +### Android Eigenarten + +Sie müssen in der config.xml folgende Einstellungen vornehmen: + +`` `` + +Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem Res/Xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens][1] . + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## SplashScreen.Hide + +Schließen Sie den Splash-Screen. + + Navigator.SplashScreen.Hide(); + + +### BlackBerry 10, WP8, iOS Eigenarten + +Die `config.xml` der Datei `AutoHideSplashScreen` muss `false` . Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready` -Ereignishandler: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## SplashScreen.Show + +Zeigt den Begrüßungsbildschirm. + + Navigator.SplashScreen.Show(); + + +Ihre Anwendung kann nicht aufgerufen werden `navigator.splashscreen.show()` bis die app gestartet hat und das `deviceready` -Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in `config.xml` wird automatisch `show` den Splash-Screen unmittelbar nach Ihrer app starten und bevor es voll gestartet und hat das `deviceready` Ereignis. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1] . Aus diesem Grund ist es unwahrscheinlich, dass Sie aufrufen müssen `navigator.splashscreen.show()` den Splash-Screen beim Starten der app sichtbar zu machen. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/es/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación. + +## Instalación + + cordova plugin add org.apache.cordova.splashscreen + + +## Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 y 8 +* Windows 8 + +## Métodos + +* splashscreen.show +* splashscreen.hide + +### Rarezas Android + +En el archivo config.xml, tienes que añadir las siguientes preferencias: + +`` `` + +Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas][1] para obtener más información. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +Despedir a la pantalla de bienvenida. + + Navigator.SplashScreen.Hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Muestra la pantalla de bienvenida. + + Navigator.SplashScreen.Show(); + + +La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/fr/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application. + +## Installation + + cordova plugin add org.apache.cordova.splashscreen + + +## Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Méthodes + +* splashscreen.Show +* splashscreen.Hide + +### Quirks Android + +Dans votre fichier config.xml, vous devez ajouter les préférences suivantes : + +`` `` + +Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage][1] . + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Faire disparaître de l'écran de démarrage. + + Navigator.SplashScreen.Hide() ; + + +### BlackBerry 10, WP8, iOS Quirk + +La `config.xml` du fichier `AutoHideSplashScreen` doit être `false` . Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur comme suit dans la `deviceready` gestionnaire d'événements : + + setTimeout(function() {navigator.splashscreen.hide() ; + }, 2000) ; + + +## splashscreen.Show + +Affiche l'écran de démarrage. + + Navigator.SplashScreen.Show() ; + + +Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et le `deviceready` événement a été déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration en `config.xml` sera automatiquement `show` l'écran de démarrage immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu le `deviceready` événement. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,88 @@ + + +# org.apache.cordova.splashscreen + +This plugin displays and hides a splash screen during application launch. + +## Installation + + cordova plugin add org.apache.cordova.splashscreen + + +## Supported Platforms + +- Amazon Fire OS +- Android +- BlackBerry 10 +- iOS +- Windows Phone 7 and 8 +- Windows 8 + + +## Methods + +- splashscreen.show +- splashscreen.hide + +### Android Quirks + +In your config.xml, you need to add the following preferences: + + + + +Where foo is the name of the splashscreen file, preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders. The second parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) +for more information. + +## splashscreen.hide + +Dismiss the splash screen. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +The `config.xml` file's `AutoHideSplashScreen` setting must be +`false`. To delay hiding the splash screen for two seconds, add a +timer such as the following in the `deviceready` event handler: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + +## splashscreen.show + +Displays the splash screen. + + navigator.splashscreen.show(); + + +Your application cannot call `navigator.splashscreen.show()` until the app has +started and the `deviceready` event has fired. But since typically the splash +screen is meant to be visible before your app has started, that would seem to +defeat the purpose of the splash screen. Providing some configuration in +`config.xml` will automatically `show` the splash screen immediately after your +app launch and before it has fully started and received the `deviceready` +event. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) +for more information on doing this configuration. For this reason, it is +unlikely you need to call `navigator.splashscreen.show()` to make the splash +screen visible for app startup. + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/it/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione. + +## Installazione + + cordova plugin add org.apache.cordova.splashscreen + + +## Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 e 8 +* Windows 8 + +## Metodi + +* splashscreen +* splashscreen.Hide + +### Stranezze Android + +Nel vostro config. xml, è necessario aggiungere le seguenti preferenze: + +`` `` + +Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali][1] . + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Respingere la schermata iniziale. + + Navigator.SplashScreen.Hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false` . Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel `deviceready` gestore di evento: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen + +Visualizza la schermata iniziale. + + Navigator.SplashScreen.Show(); + + +L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando ha iniziato l'app e il `deviceready` ha generato l'evento. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione in `config.xml` verrà automaticamente `show` la schermata iniziale subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto il `deviceready` evento. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1] . Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ja/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,74 @@ + + +# org.apache.cordova.splashscreen + +このプラグインが表示され、アプリケーションの起動中にスプラッシュ スクリーンを非表示にします。 + +## インストール + + cordova plugin add org.apache.cordova.splashscreen + + +## サポートされているプラットフォーム + +* アマゾン火 OS +* アンドロイド +* ブラックベリー 10 +* iOS +* Windows Phone 7 と 8 +* Windows 8 + +## メソッド + +* splashscreen.show +* splashscreen.hide + +### Android の癖 + +あなたの config.xml を以下の設定を追加する必要があります。 + +`` `` + +Foo ができれば 9 パッチファイル splashscreen ファイルの名前です。 解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。 2 番目のパラメーターは、スプラッシュ ・ スクリーンがの表示時間 (ミリ秒単位) を表します。 デフォルトでは 3000 ミリ秒です。 詳細については、[アイコンとスプラッシュ画面][1]を参照してください。 + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +スプラッシュ スクリーンを閉じます。 + + navigator.splashscreen.hide(); + + +### ブラックベリー 10、WP8、iOS の気まぐれ + +`config.xml`ファイルの `AutoHideSplashScreen` 設定する必要があります `false` 。 遅延を 2 秒間スプラッシュ スクリーンを非表示、タイマーを追加しますで次のように `deviceready` イベント ハンドラー。 + + setTimeout(function() {navigator.splashscreen.hide();}, 2000年); + + +## splashscreen.show + +スプラッシュ画面が表示されます。 + + navigator.splashscreen.show(); + + +アプリケーションを呼び出すことはできません `navigator.splashscreen.show()` 、アプリが開始されるまで、 `deviceready` イベントが発生します。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 いくつかの構成を提供する `config.xml` は自動的に `show` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、受信する前に、 `deviceready` イベント。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1]を参照してください。 このような理由から、それは可能性を呼び出す必要があります `navigator.splashscreen.show()` アプリ起動時のスプラッシュ画面を見やすくします。 \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ko/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +이 플러그인은 표시 하 고 응용 프로그램 실행 하는 동안 시작 화면을 숨깁니다. + +## 설치 + + cordova plugin add org.apache.cordova.splashscreen + + +## 지원 되는 플랫폼 + +* 아마존 화재 운영 체제 +* 안 드 로이드 +* 블랙베리 10 +* iOS +* Windows Phone 7과 8 +* 윈도우 8 + +## 메서드 + +* splashscreen.show +* splashscreen.hide + +### 안 드 로이드 단점 + +당신의 config.xml에 다음 환경 설정에 추가 해야 합니다. + +`` `` + +여기서 foo splashscreen 파일, 선호 9 패치 파일의 이름입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다. 두 번째 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 됩니다 나타냅니다. 3000 ms 기본값으로 사용 됩니다. 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +시작 화면을 닫습니다. + + navigator.splashscreen.hide(); + + +### 블랙베리 10, WP8, iOS 특질 + +`config.xml`파일의 `AutoHideSplashScreen` 설정을 해야 합니다 `false` . 2 초 동안 시작 화면을 숨기고 지연에 다음과 같이 타이머 추가 `deviceready` 이벤트 처리기: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +시작 화면을 표시합니다. + + navigator.splashscreen.show(); + + +응용 프로그램 호출할 수 없습니다 `navigator.splashscreen.show()` 응용 프로그램은 시작 될 때까지 및 `deviceready` 이벤트를 해 고 했다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. 몇 가지 구성을 제공 `config.xml` 자동으로 `show` 시작 화면 응용 프로그램 실행 후 즉시 및 그것은 완벽 하 게 시작 하 고 받은 전에 `deviceready` 이벤트. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 호출 해야 `navigator.splashscreen.show()` 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 합니다. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/pl/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji. + +## Instalacja + + cordova plugin add org.apache.cordova.splashscreen + + +## Obsługiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 i 8 +* Windows 8 + +## Metody + +* splashscreen.show +* splashscreen.Hide + +### Dziwactwa Androida + +W pliku config.xml musisz dodać następujące preferencje: + +`` `` + +Gdzie foo jest nazwą pliku ekranu powitalnego, najlepiej 9 łatce. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak długo ekranu powitalnego pojawi się w milisekundach. Domyślnie 3000 ms. Aby uzyskać więcej informacji, zobacz [ikony i ekrany powitalne w aplikacjach][1] . + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Odrzucić ten opryskaæ têcza. + + Navigator.splashscreen.Hide(); + + +### Jeżyna 10, WP8, iOS dziwactwo + +`config.xml`Pliku `AutoHideSplashScreen` ustawienie musi być `false` . Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Wyświetla ekran powitalny. + + Navigator.splashscreen.show(); + + +Aplikacja nie może wywołać `navigator.splashscreen.show()` aż aplikacja została uruchomiona i `deviceready` imprezy został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `config.xml` będzie automatycznie `show` ekran powitalny, natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i otrzymał `deviceready` zdarzenie. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1] . Z tego powodu, jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()` Aby wyświetlić ekran powitalny dla uruchamiania aplikacji. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ru/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,75 @@ + + +# org.apache.cordova.splashscreen + +Этот плагин отображает и скрывает экран-заставку при запуске приложения. + +## Установка + + cordova plugin add org.apache.cordova.splashscreen + + +## Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 и 8 +* Windows 8 + +## Методы + +* splashscreen.show +* splashscreen.hide + +### Особенности Android + +В вашем файле config.xml необходимо добавить следующие настройки: + +`` `` + +Где foo это имя файла splashscreen, желательно 9 заплатку. Убедитесь в том добавить ваши splashcreen файлы в папку res/xml в соответствующие папки. Второй параметр представляет, как долго splashscreen появится в миллисекундах. По умолчанию он 3000 МС. Увидеть [иконки и заставки][1] для получения дополнительной информации. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +Закройте экран-заставка. + + Navigator.SplashScreen.Hide(); + + +### Особенности BlackBerry 10, WP8, iOS + +`config.xml`Файла `AutoHideSplashScreen` должен быть `false` . Для задержки скрытия заставки на две секунды, добавить таймер, например в `deviceready` обработчик событий: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Отображает экран-заставку. + + Navigator.SplashScreen.Show(); + + +Ваше приложение не может вызвать `navigator.splashscreen.show()` до тех пор, пока приложение началась и `deviceready` событие инициировано. Но поскольку обычно экран-заставка должен быть видимым до начала вашего приложения, что казалось бы поражение цели экрана-заставки. Предоставление некоторых конфигурации в `config.xml` будет автоматически `show` экран-заставку сразу же после запуска вашего приложения и перед его полностью запущен и получил `deviceready` событие. Увидеть [иконки и заставки][1] для получения дополнительной информации на делать этой конфигурации. По этой причине маловероятно, вам нужно вызвать `navigator.splashscreen.show()` для отображения экрана-заставки для запуска приложения. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,74 @@ + + +# org.apache.cordova.splashscreen + +這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。 + +## 安裝 + + cordova plugin add org.apache.cordova.splashscreen + + +## 支援的平臺 + +* 亞馬遜火 OS +* Android 系統 +* 黑莓 10 +* iOS +* Windows Phone 7 和 8 +* Windows 8 + +## 方法 + +* splashscreen.show +* splashscreen.hide + +### Android 的怪癖 + +在你的 config.xml,您需要添加以下優惠: + +`` `` + +美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見[圖示和啟動畫面][1]。 + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +解雇的閃屏。 + + navigator.splashscreen.hide() ; + + +### 黑莓 10,WP8,iOS 怪癖 + +`config.xml`檔的 `AutoHideSplashScreen` 設置必須為 `false` 。 若要延遲兩秒鐘隱藏的閃屏,添加如下所示在計時器 `deviceready` 事件處理常式: + + setTimeout(function() {navigator.splashscreen.hide() ;},2000年) ; + + +## splashscreen.show + +顯示初始螢幕。 + + navigator.splashscreen.show() ; + + +您的應用程式無法調用 `navigator.splashscreen.show()` 直到應用程式已經開始, `deviceready` 觸發了事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 將自動 `show` 閃屏您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱[圖示和啟動畫面][1]。 出於這個原因,它不太可能您需要調用 `navigator.splashscreen.show()` ,使初始螢幕可見為應用程式啟動。 \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,126 @@ + + + + + Splashscreen + Cordova Splashscreen Plugin + Apache 2.0 + cordova,splashscreen + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + https://issues.apache.org/jira/browse/CB/component/12320653 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/android/SplashScreen.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/android/SplashScreen.java Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,43 @@ +/* + 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. +*/ + +package org.apache.cordova.splashscreen; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; + +public class SplashScreen extends CordovaPlugin { + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { + if (action.equals("hide")) { + this.webView.postMessage("splashscreen", "hide"); + } else if (action.equals("show")){ + this.webView.postMessage("splashscreen", "show"); + } + else { + return false; + } + + callbackContext.success(); + return true; + } + +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/blackberry10/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,28 @@ +/* + * Copyright 2013 Research In Motion Limited. + * + * Licensed 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. + */ + +module.exports = { + show: function (success, fail, args, env) { + var result = new PluginResult(args, env); + result.error("Not supported on platform", false); + }, + + hide: function (success, fail, args, env) { + var result = new PluginResult(args, env); + window.qnx.webplatform.getApplication().windowVisible = true; + result.ok(undefined, false); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,43 @@ +/* + 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. + */ + +#import +#import + +typedef struct { + BOOL iPhone; + BOOL iPad; + BOOL iPhone5; + BOOL iPhone6; + BOOL iPhone6Plus; + BOOL retina; + +} CDV_iOSDevice; + +@interface CDVSplashScreen : CDVPlugin { + UIActivityIndicatorView* _activityView; + UIImageView* _imageView; + NSString* _curImageName; + BOOL _visible; +} + +- (void)show:(CDVInvokedUrlCommand*)command; +- (void)hide:(CDVInvokedUrlCommand*)command; + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,307 @@ +/* + 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. + */ + +#import "CDVSplashScreen.h" +#import +#import + +#define kSplashScreenDurationDefault 0.25f + + +@implementation CDVSplashScreen + +- (void)pluginInitialize +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:self.webView]; + + [self setVisible:YES]; +} + +- (void)show:(CDVInvokedUrlCommand*)command +{ + [self setVisible:YES]; +} + +- (void)hide:(CDVInvokedUrlCommand*)command +{ + [self setVisible:NO]; +} + +- (void)pageDidLoad +{ + id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]]; + + // if value is missing, default to yes + if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) { + [self setVisible:NO]; + } +} + +- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context +{ + [self updateImage]; +} + +- (void)createViews +{ + /* + * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style. + * + * whiteLarge = UIActivityIndicatorViewStyleWhiteLarge + * white = UIActivityIndicatorViewStyleWhite + * gray = UIActivityIndicatorViewStyleGray + * + */ + NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; + UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + + if ([topActivityIndicator isEqualToString:@"whiteLarge"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge; + } else if ([topActivityIndicator isEqualToString:@"white"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite; + } else if ([topActivityIndicator isEqualToString:@"gray"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + } + + UIView* parentView = self.viewController.view; + parentView.userInteractionEnabled = NO; // disable user interaction while splashscreen is shown + _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle]; + _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2); + _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin + | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin; + [_activityView startAnimating]; + + // Set the frame & image later. + _imageView = [[UIImageView alloc] init]; + [parentView addSubview:_imageView]; + + id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner" lowercaseString]]; + // backwards compatibility - if key is missing, default to true + if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) { + [parentView addSubview:_activityView]; + } + + // Frame is required when launching in portrait mode. + // Bounds for landscape since it captures the rotation. + [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil]; + [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil]; + + [self updateImage]; +} + +- (void)destroyViews +{ + [_imageView removeFromSuperview]; + [_activityView removeFromSuperview]; + _imageView = nil; + _activityView = nil; + _curImageName = nil; + + self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion + [self.viewController.view removeObserver:self forKeyPath:@"frame"]; + [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; +} + +- (CDV_iOSDevice) getCurrentDevice +{ + CDV_iOSDevice device; + + UIScreen* mainScreen = [UIScreen mainScreen]; + CGFloat mainScreenHeight = mainScreen.bounds.size.height; + CGFloat mainScreenWidth = mainScreen.bounds.size.width; + + int limit = MAX(mainScreenHeight,mainScreenWidth); + + device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); + device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); + device.retina = ([mainScreen scale] == 2.0); + device.iPhone5 = (device.iPhone && limit == 568.0); + // note these below is not a true device detect, for example if you are on an + // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but + // this is appropriate for detecting the runtime screen environment + device.iPhone6 = (device.iPhone && limit == 667.0); + device.iPhone6Plus = (device.iPhone && limit == 736.0); + + return device; +} + +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device +{ + // Use UILaunchImageFile if specified in plist. Otherwise, use Default. + NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; + + NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; + + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape + BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); + BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); + // this means there are no mixed orientations in there + BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); + + if (imageName) { + imageName = [imageName stringByDeletingPathExtension]; + } else { + imageName = @"Default"; + } + + if (device.iPhone5) { // does not support landscape + imageName = [imageName stringByAppendingString:@"-568h"]; + } else if (device.iPhone6) { // does not support landscape + imageName = [imageName stringByAppendingString:@"-667h"]; + } else if (device.iPhone6Plus) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + default: + break; + } + } + imageName = [imageName stringByAppendingString:@"-736h"]; + + } else if (device.iPad) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationPortraitUpsideDown: + default: + imageName = [imageName stringByAppendingString:@"-Portrait"]; + break; + } + } + } + + return imageName; +} + +// Sets the view's frame and image. +- (void)updateImage +{ + NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id)self.viewController device:[self getCurrentDevice]]; + + if (![imageName isEqualToString:_curImageName]) { + UIImage* img = [UIImage imageNamed:imageName]; + _imageView.image = img; + _curImageName = imageName; + } + + // Check that splash screen's image exists before updating bounds + if (_imageView.image) { + [self updateBounds]; + } else { + NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName); + } +} + +- (void)updateBounds +{ + UIImage* img = _imageView.image; + CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero; + + CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size; + UIInterfaceOrientation orientation = self.viewController.interfaceOrientation; + CGAffineTransform imgTransform = CGAffineTransformIdentity; + + /* If and only if an iPhone application is landscape-only as per + * UISupportedInterfaceOrientations, the view controller's orientation is + * landscape. In this case the image must be rotated in order to appear + * correctly. + */ + if (UIInterfaceOrientationIsLandscape(orientation) && !CDV_IsIPad()) { + imgTransform = CGAffineTransformMakeRotation(M_PI / 2); + imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width); + } + + // There's a special case when the image is the size of the screen. + if (CGSizeEqualToSize(screenSize, imgBounds.size)) { + CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil]; + if (!(IsAtLeastiOSVersion(@"7.0"))) { + imgBounds.origin.y -= statusFrame.size.height; + } + } else if (imgBounds.size.width > 0) { + CGRect viewBounds = self.viewController.view.bounds; + CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height; + CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height; + // This matches the behaviour of the native splash screen. + CGFloat ratio; + if (viewAspect > imgAspect) { + ratio = viewBounds.size.width / imgBounds.size.width; + } else { + ratio = viewBounds.size.height / imgBounds.size.height; + } + imgBounds.size.height *= ratio; + imgBounds.size.width *= ratio; + } + + _imageView.transform = imgTransform; + _imageView.frame = imgBounds; +} + +- (void)setVisible:(BOOL)visible +{ + if (visible == _visible) { + return; + } + _visible = visible; + + id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]]; + id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]]; + + float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue]; + + if ((fadeSplashScreenValue == nil) || ![fadeSplashScreenValue boolValue]) { + fadeDuration = 0; + } + + // Never animate the showing of the splash screen. + if (visible) { + if (_imageView == nil) { + [self createViews]; + } + } else if (fadeDuration == 0) { + [self destroyViews]; + } else { + [UIView transitionWithView:self.viewController.view + duration:fadeDuration + options:UIViewAnimationOptionTransitionNone + animations:^(void) { + [_imageView setAlpha:0]; + [_activityView setAlpha:0]; + } + completion:^(BOOL finished) { + if (finished) { + [self destroyViews]; + } + } + ]; + } +} + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/tizen/SplashScreenProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/tizen/SplashScreenProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,43 @@ +/* + * + * 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. + * +*/ + +( function() { + +win = null; + +module.exports = { + show: function() { + if ( win === null ) { + win = window.open('splashscreen.html'); + } + }, + + hide: function() { + if ( win !== null ) { + win.close(); + win = null; + } + } +}; + +require("cordova/tizen/commandProxy").add("SplashScreen", module.exports); + +})(); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,42 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * 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. + * +*/ + +#include + +#include "splashscreen.h" +#include + +#define SPLASHSCREEN_STATE_NAME "splashscreen" + +Splashscreen::Splashscreen(Cordova *cordova): CPlugin(cordova) { +} + +void Splashscreen::show(int, int) { + m_cordova->rootObject()->setProperty("splashscreenPath", m_cordova->getSplashscreenPath()); + + m_cordova->pushViewState(SPLASHSCREEN_STATE_NAME); +} + +void Splashscreen::hide(int, int) { + m_cordova->popViewState(SPLASHSCREEN_STATE_NAME); +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,52 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * 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. + * +*/ + +#ifndef SPLASHSCREEN_H +#define SPLASHSCREEN_H + +#include +#include + +class Splashscreen: public CPlugin { + Q_OBJECT +public: + explicit Splashscreen(Cordova *cordova); + + virtual const QString fullName() override { + return Splashscreen::fullID(); + } + + virtual const QString shortName() override { + return "SplashScreen"; + } + + static const QString fullID() { + return "SplashScreen"; + } + +public slots: + void show(int, int); + void hide(int, int); +}; + +#endif // SPLASHSCREEN_H diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/wp/SplashScreen.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/wp/SplashScreen.cs Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,167 @@ +/* + Licensed 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. +*/ + +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Microsoft.Phone.Info; +using System.Windows.Controls.Primitives; +using System.Diagnostics; +using System.Windows.Media.Imaging; +using System.Windows.Resources; +using System.IO; +using System.Xml.Linq; +using System.Linq; +using System.Windows.Threading; + +namespace WPCordovaClassLib.Cordova.Commands +{ + /// + /// Listens for changes to the state of the battery on the device. + /// Currently only the "isPlugged" parameter available via native APIs. + /// + public class SplashScreen : BaseCommand + { + private Popup popup; + private bool autohide = true; + + private static bool WasShown = false; + + public SplashScreen() + { + Image SplashScreen = new Image(); + BitmapImage splash_image = new BitmapImage(); + splash_image.SetSource(Application.GetResourceStream(new Uri(@"SplashScreenImage.jpg", UriKind.Relative)).Stream); + SplashScreen.Source = splash_image; + + // Instansiate the popup and set the Child property of Popup to SplashScreen + popup = new Popup() {IsOpen = false, Child = SplashScreen }; + // Orient the popup accordingly + popup.HorizontalAlignment = HorizontalAlignment.Stretch; + popup.VerticalAlignment = VerticalAlignment.Center; + + + LoadConfigValues(); + } + + public override void OnInit() + { + // we only want to autoload the first time a page is loaded. + if (!WasShown) + { + WasShown = true; + show(); + } + } + + void LoadConfigValues() + { + StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("config.xml", UriKind.Relative)); + + if (streamInfo != null) + { + StreamReader sr = new StreamReader(streamInfo.Stream); + //This will Read Keys Collection for the xml file + XDocument document = XDocument.Parse(sr.ReadToEnd()); + + var preferences = from results in document.Descendants() + where (string)results.Attribute("name") == "AutoHideSplashScreen" + select (string)results.Attribute("value") == "true"; + + if (preferences.Count() > 0 && preferences.First() == false) + { + autohide = false; + } + } + } + + public void show(string options = null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (popup.IsOpen) + { + return; + } + + popup.Child.Opacity = 0; + + Storyboard story = new Storyboard(); + DoubleAnimation animation; + animation = new DoubleAnimation(); + animation.From = 0.0; + animation.To = 1.0; + animation.Duration = new Duration(TimeSpan.FromSeconds(0.2)); + + Storyboard.SetTarget(animation, popup.Child); + Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity")); + story.Children.Add(animation); + + Debug.WriteLine("Fading the splash screen in"); + + story.Begin(); + + popup.IsOpen = true; + + if (autohide) + { + DispatcherTimer timer = new DispatcherTimer(); + timer.Tick += (object sender, EventArgs e) => + { + hide(); + }; + timer.Interval = TimeSpan.FromSeconds(1.2); + timer.Start(); + } + }); + } + + + public void hide(string options = null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (!popup.IsOpen) + { + return; + } + + popup.Child.Opacity = 1.0; + + Storyboard story = new Storyboard(); + DoubleAnimation animation; + animation = new DoubleAnimation(); + animation.From = 1.0; + animation.To = 0.0; + animation.Duration = new Duration(TimeSpan.FromSeconds(0.4)); + + Storyboard.SetTarget(animation, popup.Child); + Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity")); + story.Children.Add(animation); + story.Completed += (object sender, EventArgs e) => + { + popup.IsOpen = false; + }; + story.Begin(); + }); + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,7 @@ + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 6BE9AD73-1B9F-4362-98D7-DC631BEC6185 + IDESourceControlProjectName + CDVSplashScreenTest + IDESourceControlProjectOriginsDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + + IDESourceControlProjectPath + tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + ../../../../.. + + IDESourceControlProjectURL + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlWCCName + cordova-plugin-splashscreen + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,702 @@ +/* + 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. + */ + +#import +#import +#import +#import "CDVSplashScreen.h" +#import "ImageNameTestDelegates.h" + +const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; + +@interface ImageNameTest : XCTestCase + +@property (nonatomic, strong) CDVSplashScreen* plugin; + +@end + +@interface CDVSplashScreen () + +// expose private interface +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device; + +@end + +@implementation ImageNameTest + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. + + self.plugin = [[CDVSplashScreen alloc] init]; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void) orientationHelper:(id)delegate expectedImageNameDictionary:(NSDictionary*)expectedImageNameDictionary device:(CDV_iOSDevice)device{ + + NSString* name = nil; + NSString* expectedImageName = nil; + UIInterfaceOrientation currentOrientation; + NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone"; + + // LandscapeLeft, should always return expectedImageName + currentOrientation = UIInterfaceOrientationLandscapeLeft; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeLeft"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name); + + // LandscapeRight - should always return expectedImageName + currentOrientation = UIInterfaceOrientationLandscapeRight; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeRight"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name); + + // Portrait - should always return expectedImageName + currentOrientation = UIInterfaceOrientationPortrait; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"portrait"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name); + + // PortraitUpsideDown - should always return expectedImageName + currentOrientation = UIInterfaceOrientationPortraitUpsideDown; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"portraitUpsideDown"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name); +} + +- (void)testiPadOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPad = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; +} + +- (void)testiPhoneOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; +} + +- (void)testiPhone5Orientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone5 = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; +} + +- (void)testiPhone6Orientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone6 = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; +} + +- (void)testiPhone6PlusOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone6Plus = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; +} + + + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,57 @@ +/* + 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. + */ + +#import +#import + +@interface PortraitOnly : NSObject +@end + +@interface PortraitUpsideDownOnly : NSObject +@end + +@interface AllPortraitOnly : NSObject +@end + + +@interface LandscapeLeftOnly : NSObject +@end + +@interface LandscapeRightOnly : NSObject +@end + +@interface AllLandscapeOnly : NSObject +@end + + +@interface AllOrientations : NSObject +@end + +@interface PortraitAndLandscapeLeftOnly : NSObject +@end + +@interface PortraitAndLandscapeRightOnly : NSObject +@end + +@interface PortraitUpsideDownAndLandscapeLeftOnly : NSObject +@end + +@interface PortraitUpsideDownAndLandscapeRightOnly : NSObject +@end + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,200 @@ +/* + 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. + */ + +#import +#import "ImageNameTestDelegates.h" + +@implementation PortraitOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation AllPortraitOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + + +@implementation LandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation LandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation AllLandscapeOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + + +@implementation AllOrientations + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskAll; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitAndLandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitAndLandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownAndLandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownAndLandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.apache.cordova.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,505 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */; }; + 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B019DA114400DA31AC /* ImageNameTest.m */; }; + 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B219DA116500DA31AC /* Foundation.framework */; }; + 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B419DA127E00DA31AC /* UIKit.framework */; }; + 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */; }; + 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; }; + 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519019DA0F8300DA31AC /* libCordova.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 68A32D7114102E1C006B237C; + remoteInfo = CordovaLib; + }; + 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F517219DA09CE00DA31AC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7E9F519419DA102000DA31AC; + remoteInfo = CDVSplashScreenLib; + }; + 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = CordovaLib; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7E9F519319DA102000DA31AC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = ""; }; + 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCDVSplashScreenLib.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDVSplashScreenLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E9F51A219DA102000DA31AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = ../../../src/ios/CDVSplashScreen.m; sourceTree = SOURCE_ROOT; }; + 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../src/ios/CDVSplashScreen.h; sourceTree = SOURCE_ROOT; }; + 7E9F51B019DA114400DA31AC /* ImageNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTest.m; sourceTree = ""; }; + 7E9F51B219DA116500DA31AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 7E9F51B419DA127E00DA31AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageNameTestDelegates.h; sourceTree = ""; }; + 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTestDelegates.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7E9F519219DA102000DA31AC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E9F519C19DA102000DA31AC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */, + 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */, + 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */, + 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7E9F517119DA09CE00DA31AC = { + isa = PBXGroup; + children = ( + 7E9F51B419DA127E00DA31AC /* UIKit.framework */, + 7E9F51B219DA116500DA31AC /* Foundation.framework */, + 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */, + 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */, + 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */, + 7E9F517D19DA0A0A00DA31AC /* Products */, + ); + sourceTree = ""; + }; + 7E9F517D19DA0A0A00DA31AC /* Products */ = { + isa = PBXGroup; + children = ( + 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */, + 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 7E9F518C19DA0F8300DA31AC /* Products */ = { + isa = PBXGroup; + children = ( + 7E9F519019DA0F8300DA31AC /* libCordova.a */, + ); + name = Products; + sourceTree = ""; + }; + 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */ = { + isa = PBXGroup; + children = ( + 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */, + 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */, + ); + path = CDVSplashScreenLib; + sourceTree = SOURCE_ROOT; + }; + 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */ = { + isa = PBXGroup; + children = ( + 7E9F51A119DA102000DA31AC /* Supporting Files */, + 7E9F51B019DA114400DA31AC /* ImageNameTest.m */, + 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */, + 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */, + ); + path = CDVSplashScreenLibTests; + sourceTree = ""; + }; + 7E9F51A119DA102000DA31AC /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 7E9F51A219DA102000DA31AC /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */; + buildPhases = ( + 7E9F519119DA102000DA31AC /* Sources */, + 7E9F519219DA102000DA31AC /* Frameworks */, + 7E9F519319DA102000DA31AC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CDVSplashScreenLib; + productName = CDVSplashScreenLib; + productReference = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; + productType = "com.apple.product-type.library.static"; + }; + 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */; + buildPhases = ( + 7E9F519B19DA102000DA31AC /* Sources */, + 7E9F519C19DA102000DA31AC /* Frameworks */, + 7E9F519D19DA102000DA31AC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */, + 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */, + ); + name = CDVSplashScreenLibTests; + productName = CDVSplashScreenLibTests; + productReference = 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7E9F517219DA09CE00DA31AC /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0600; + TargetAttributes = { + 7E9F519419DA102000DA31AC = { + CreatedOnToolsVersion = 6.0; + }; + 7E9F519E19DA102000DA31AC = { + CreatedOnToolsVersion = 6.0; + }; + }; + }; + buildConfigurationList = 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7E9F517119DA09CE00DA31AC; + productRefGroup = 7E9F517D19DA0A0A00DA31AC /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 7E9F518C19DA0F8300DA31AC /* Products */; + ProjectRef = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */, + 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 7E9F519019DA0F8300DA31AC /* libCordova.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libCordova.a; + remoteRef = 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 7E9F519D19DA102000DA31AC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7E9F519119DA102000DA31AC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E9F519B19DA102000DA31AC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */, + 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */; + targetProxy = 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */; + }; + 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CordovaLib; + targetProxy = 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 7E9F517619DA09CE00DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 7E9F517719DA09CE00DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + 7E9F51A419DA102000DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 7E9F51A519DA102000DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7E9F51A719DA102000DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 7E9F51A819DA102000DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F517619DA09CE00DA31AC /* Debug */, + 7E9F517719DA09CE00DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F51A419DA102000DA31AC /* Debug */, + 7E9F51A519DA102000DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F51A719DA102000DA31AC /* Debug */, + 7E9F51A819DA102000DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7E9F517219DA09CE00DA31AC /* Project object */; +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,7 @@ + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 6BE9AD73-1B9F-4362-98D7-DC631BEC6185 + IDESourceControlProjectName + CDVSplashScreenTest + IDESourceControlProjectOriginsDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + + IDESourceControlProjectPath + tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + ../../../../.. + + IDESourceControlProjectURL + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlWCCName + cordova-plugin-splashscreen + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,21 @@ +# iOS Tests for CDVSplashScreen + +You need to install `node.js` to pull in `cordova-ios`. + +First install cordova-ios: + + npm install + +... in the current folder. + + +# Testing from Xcode + +1. Launch the `CDVSplashScreenTest.xcworkspace` file. +2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu +3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests + + +# Testing from the command line + + npm test diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/package.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/package.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,13 @@ +{ + "name": "cordova-plugin-splashscreen-test-ios", + "version": "1.0.0", + "description": "iOS Unit Tests for Splashscreen Plugin", + "author": "Apache Software Foundation", + "license": "Apache Version 2.0", + "dependencies": { + "cordova-ios": "^3.6.0" + }, + "scripts": { + "test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5'" + } +} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,29 @@ + + + + + Cordova Splashscreen Plugin Tests + Apache 2.0 + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/tests.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/tests.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,62 @@ +/* + * + * 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. + * +*/ + +exports.defineAutoTest = function () { + describe('Splashscreen (cordova)', function () { + it("splashscreen.spec.1 should exist", function () { + expect(navigator.splashscreen).toBeDefined(); + }); + + it("splashscreen.spec.2 exec method should exist", function () { + expect(navigator.splashscreen.show).toBeDefined(); + expect(typeof navigator.splashscreen.show).toBe('function'); + }); + + it("splashscreen.spec.3 exec method should exist", function () { + expect(navigator.splashscreen.hide).toBeDefined(); + expect(typeof navigator.splashscreen.hide).toBe('function'); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + function showFor(duration) { + navigator.splashscreen.show(); + window.setTimeout(function () { + navigator.splashscreen.hide(); + }, 1000 * duration); + } + + contentEl.innerHTML = '

Splashscreen Tests

' + + '

Note for WP: AutoHideSplashScreen must be set to false in config.xml

' + + '
' + + 'Expected result: Will show the Cordova splashscreen for 1 second' + + '

' + + 'Expected result: Will show the Cordova splashscreen for 5 seconds'; + + createActionButton('Show for 1 second', function () { + showFor(1); + }, 'show1'); + + createActionButton('Show for 5 seconds', function () { + showFor(5); + }, 'show5'); +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/www/splashscreen.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/www/splashscreen.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,33 @@ +/* + * + * 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. + * +*/ + +var exec = require('cordova/exec'); + +var splashscreen = { + show:function() { + exec(null, null, "SplashScreen", "show", []); + }, + hide:function() { + exec(null, null, "SplashScreen", "hide", []); + } +}; + +module.exports = splashscreen; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/www/windows8/SplashScreenProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/www/windows8/SplashScreenProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,106 @@ +/* + * + * 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. + * +*/ + +/*jslint sloppy:true */ +/*global Windows:true, require, module, window, document, WinJS */ + +var cordova = require('cordova'), + channel = require('cordova/channel'); + +/* This is the actual implementation part that returns the result on Windows 8 +*/ + +var position = { x: 0, y: 0, width: 0, height: 0 }; // defined by evt.detail.splashScreen.imageLocation +var splash = null; // +var localSplash; // the image to display +var localSplashImage; +var bgColor = "#464646"; + + + +function updateImageLocation() { + localSplash.style.width = window.innerWidth + "px"; + localSplash.style.height = window.innerHeight + "px"; + localSplash.style.top = "0px"; + localSplash.style.left = "0px"; + + localSplashImage.style.top = position.y + "px"; + localSplashImage.style.left = position.x + "px"; + localSplashImage.style.height = position.height + "px"; + localSplashImage.style.width = position.width + "px"; +} + +function onResize(evt) { + if (splash) { + position = splash.imageLocation; + updateImageLocation(); + } +} + +var SplashScreen = { + setBGColor: function (cssBGColor) { + bgColor = cssBGColor; + if (localSplash) { + localSplash.style.backgroundColor = bgColor; + } + }, + show: function () { + window.addEventListener("resize", onResize, false); + localSplash = document.createElement("div"); + localSplash.style.backgroundColor = bgColor; + localSplash.style.position = "absolute"; + + localSplashImage = document.createElement("img"); + localSplashImage.src = "ms-appx:///images/splashscreen.png"; + localSplashImage.style.position = "absolute"; + + updateImageLocation(); + + localSplash.appendChild(localSplashImage); + document.body.appendChild(localSplash); + }, + hide: function () { + window.removeEventListener("resize", onResize, false); + document.body.removeChild(localSplash); + localSplash = null; + } +}; + +module.exports = SplashScreen; + +function activated(evt) { + if (evt.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { + splash = evt.detail.splashScreen; + position = evt.detail.splashScreen.imageLocation; + } +} + + + + +channel.onCordovaReady.subscribe(function (evt) { + document.addEventListener("DOMContentLoaded", function (evt) { + WinJS.Application.addEventListener("activated", activated, false); + }, false); +}); + +require("cordova/exec/proxy").add("SplashScreen", SplashScreen); + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/.fetch.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/.fetch.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,1 @@ +{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.vibration"}} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/CONTRIBUTING.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +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). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/LICENSE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/NOTICE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/NOTICE Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,7 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product includes software developed by Joerg Wiedenmann under the zlib license (http://www.gzip.org/zlib/zlib_license.html) diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/README.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,23 @@ + + +# org.apache.cordova.vibration + +Plugin documentation: [doc/index.md](doc/index.md) + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/RELEASENOTES.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,110 @@ + +# Release Notes + +### 0.3.0 (Sept 5, 2013) +* Initial FirefoxOS support +* [CB-4661] VIBRATE permission for Android + +### 0.3.2 (Sept 25, 2013) +* CB-4889 bumping&resetting version +* CB-4889 renaming org.apache.cordova.core.vibration to org.apache.cordova.vibration +* Rename CHANGELOG.md -> RELEASENOTES.md +* updated to work with ffos commandProxy +* fixed plugin.xml for vibration +* [CB-4593] [Blackberry10] Added vibration support for bb10 +* updated plugin to work with ffos +* [CB-4752] Incremented plugin version on dev branch. + +### 0.3.3 (Oct 9, 2013) +* add missing android namespace +* [CB-4915] Incremented plugin version on dev branch. + +### 0.3.4 (Oct 28, 2013) +* add repo + issue tag to plugin.xml for vibration plugin +* corrected plugin.xml to write properly to config.xml for ffos +* [CB-5010] Incremented plugin version on dev branch. + +### 0.3.5 (Dec 4, 2013) +* add ubuntu platform +* Added amazon-fireos platform. Change to include amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos' +* CB-4747 Fixed Blackberry background vibrate + +### 0.3.6 (Jan 02, 2014) +* CB-5658 Add doc/index.md for Vibration plugin + +### 0.3.7 (Feb 05, 2014) +* Add support for Tizen. +* CB-3206 - Supported platforms updated + +### 0.3.8 (Apr 17, 2014) +* CB-6465: Add license headers to Tizen code +* CB-6460: Update license headers +* Add NOTICE file + +### 0.3.9 (Jun 05, 2014) +* updated notice file +* Github close #11 +* Extended vibrateWithPattern to allow for pattern repetition, implemented a complementary cancelVibration function and adapted documentation. +* Implemented vibrateWithPattern (for android) and adapted documentation. +* CB-6811 Add license to CONTRIBUTING.md +* CB-6491 add CONTRIBUTING.md + +### 0.3.10 (Aug 06, 2014) +* ubuntu: Implemented vibrateWithPattern/cancelVibration +* **FFOS** update VibrationProxy.js +* CB-6127 Updated translations for docs + +### 0.3.11 (Sep 17, 2014) +* CB-7249 cordova-plugin-vibration documentation translation +* CB-6724 documented Windows support for vibrate with pattern and cancel vibrate in manual test doc and moved tests to tests dir +* add longer pattern sequence for testing, change expected result for old vibrate with pattern test +* added more test cases, changed vibrate with pattern durations, changed where vibrateOn is set to true +* clear settimeout when user cancels vibration +* add setTimeout function to update vibrateOn var if user doesn't cancel vibrate, add note about iOS +* on/off button for cancel tests, add results box and msgs +* added tests for old vibrateWithPattern and cancelVibration calls +* added 'Android only' to buttons for specific tests, changed where console.log is executed for user to see earlier +* added tests to ensure compliance with w3c spec +* CB-6963 ported vibration automated & manual tests +* CB-6966 renamed folder to tests + added nested plugin.xml +* CB-6966 Ported Vibration automated & manual tests +* removed duplicate messaging +* CB-5459 slight change to the vibration documentation for pattern due to merge issue +* changes to how 0 is getting added to array in order to align with w3c spec +* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility +* changes made to align with w3c spec +* Updated doc with Windows support for vibrate with pattern +* Added note to doc about w3c alignment and min time for Windows +* update doc with another way to cancel vibration +* update doc to show vibrate([num]) is a standard vibrate +* vibrate([num]) is treated as a vibrate not vibrate with pattern +* added new example to documentation +* updated doc for w3c alignment +* changes to how 0 is getting added to array in order to align with w3c spec +* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility +* changes made to align with w3c spec + +### 0.3.12 (Dec 02, 2014) +* CB-8018 Add `vibrate(pattern)` fallback on vibrate for **Windows Phone 8** +* CB-7977 Mention `deviceready` in plugin docs +* CB-7700 cordova-plugin-vibration documentation translation: cordova-plugin-vibration +* CB-7571 Bump version of nested plugin to match parent plugin diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/de/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Dieses Plugin richtet mit dem W3C Vibration Spezifikation http://www.w3.org/TR/vibration/ + +Dieses Plugin bietet eine Möglichkeit, das Gerät zu vibrieren. + +## Installation + + cordova plugin add org.apache.cordova.vibration + + +## Unterstützte Plattformen + +Navigator.Vibrate +Navigator.Notification.Vibrate - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 und 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## vibrieren (empfohlen) + +Diese Funktion hat drei verschiedene Funktionalitäten, die auf der Grundlage von an sie übergebenen Parameter. + +### Standard vibrieren + +Vibriert das Gerät für einen bestimmten Zeitraum. + + navigator.vibrate(time) + + +oder + + navigator.vibrate([time]) + + +-**Zeit**: Millisekunden das Gerät vibriert. *(Anzahl)* + +#### Beispiel + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS Macken + +* **Zeit**: ignoriert die angegebene Zeit und für eine voreingestellte Zeit vibriert. + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows und Blackberry-Kniffe + +* **Zeit**: Max. Zeit 5000ms (5 s) und min Zeit ist 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### Vibrieren Sie mit einem Muster (Android und Windows nur) + +Vibriert das Gerät mit einem vorgegebenen Muster + + navigator.vibrate(pattern); + + +* **Muster**: Folge von Dauer (in Millisekunden) für den ein-oder Ausschalten der Vibrator. *(Array von Zahlen)* + +#### Beispiel + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### "Abbrechen" Vibration (nicht in iOS unterstützt) + +Sofort bricht alle derzeit ausgeführten Schwingungen. + + navigator.vibrate(0) + + +oder + + navigator.vibrate([]) + + +oder + + navigator.vibrate([0]) + + +Übergabe eines Parameters 0, wird ein leeres Array, oder ein Array mit einem Element der Wert 0 auftretender Schwingungen abbrechen. + +## *Notification.Vibrate (veraltet) + +Vibriert das Gerät für einen bestimmten Zeitraum. + + navigator.notification.vibrate(time) + + +* **Zeit**: Millisekunden das Gerät vibriert. *(Anzahl)* + +### Beispiel + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS Macken + +* **Zeit**: ignoriert die angegebene Zeit und für eine voreingestellte Zeit vibriert. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *Notification.vibrateWithPattern (veraltet) + +Vibriert das Gerät mit einem vorgegebenen Muster. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **Muster**: Folge von Dauer (in Millisekunden) für den ein-oder Ausschalten der Vibrator. *(Array von Zahlen)* +* **Wiederholen**: optionale Index in das Array Muster an der wiederholte (wird wiederholt, bis abgebrochen) zu starten, oder-1 für Wiederholung (Standard). *(Anzahl)* + +### Beispiel + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *Notification.cancelVibration (veraltet) + +Sofort bricht alle derzeit ausgeführten Schwingungen. + + navigator.notification.cancelVibration() + + +* Note - durch Angleichung an die w3c-Spezifikation, die markierten Methoden abgeschafft werden wird \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/es/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Este plugin se alinea con la vibración W3C especificación http://www.w3.org/TR/vibration/ + +Este plugin proporciona una manera de vibrar el dispositivo. + +## Instalación + + cordova plugin add org.apache.cordova.vibration + + +## Plataformas soportadas + +Navigator.Vibrate +Navigator.Notification.Vibrate - Amazon fuego OS - sistema operativo Android - BlackBerry 10 - Firefox - iOS - Windows Phone 7 y 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## vibrar (recomendado) + +Esta función tiene tres diferentes funcionalidades basadas en los parámetros pasados a él. + +### Estándar de vibrar + +Vibra el dispositivo para una cantidad dada de tiempo. + + navigator.vibrate(time) + + +o + + navigator.vibrate([time]) + + +-**tiempo**: milisegundos a vibrar el dispositivo. *(Número)* + +#### Ejemplo + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS rarezas + +* **time**: ignora el tiempo especificado y vibra por un tiempo preestablecido. + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows y rarezas de Blackberry + +* **tiempo**: tiempo máximo es 5000ms (5s) y min tiempo 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### Vibrar con un patrón (Android y Windows solamente) + +Vibra el dispositivo con un patrón determinado + + navigator.vibrate(pattern); + + +* **patrón**: secuencia de duraciones (en milisegundos) que desea activar o desactivar el vibrador. *(Matriz de números)* + +#### Ejemplo + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### Cancelar vibración (no soportada en iOS) + +Inmediatamente se cancela cualquier vibración actualmente en ejecución. + + navigator.vibrate(0) + + +o + + navigator.vibrate([]) + + +o + + navigator.vibrate([0]) + + +Pasando en un parámetro de 0, una matriz vacía o una matriz con un elemento de valor 0 se cancelará cualquier vibraciones. + +## *Notification.Vibrate (obsoleto) + +Vibra el dispositivo para una cantidad dada de tiempo. + + navigator.notification.vibrate(time) + + +* **tiempo**: milisegundos a vibrar el dispositivo. *(Número)* + +### Ejemplo + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS rarezas + +* **time**: ignora el tiempo especificado y vibra por un tiempo preestablecido. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *Notification.vibrateWithPattern (obsoleto) + +Vibra el dispositivo con un patrón determinado. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **patrón**: secuencia de duraciones (en milisegundos) que desea activar o desactivar el vibrador. *(Matriz de números)* +* **repito**: índice opcional en la matriz de patrón en el cual comenzar repitiendo (se repite hasta que se cancele), o -1 para la no repetición (por defecto). *(Número)* + +### Ejemplo + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *Notification.cancelVibration (obsoleto) + +Inmediatamente se cancela cualquier vibración actualmente en ejecución. + + navigator.notification.cancelVibration() + + +* Nota: debido a la alineación con la especificación del w3c, los métodos favoritos a ser eliminados \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/fr/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Ce plugin s'aligne avec le W3C vibration spécification http://www.w3.org/TR/vibration/ + +Ce plugin permet de vibrer l'appareil. + +## Installation + + cordova plugin add org.apache.cordova.vibration + + +## Plates-formes prises en charge + +Navigator.VIBRATE +Navigator.notification.VIBRATE - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 et 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## vibrer (recommandée) + +Cette fonction a trois différentes fonctionnalités basées sur les paramètres passés à elle. + +### Norme vibrer + +Vibre l'appareil pendant un certain temps. + + navigator.vibrate(time) + + +ou + + navigator.vibrate([time]) + + +-**temps**: millisecondes à vibrer l'appareil. *(Nombre)* + +#### Exemple + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS Quirks + +* **temps**: ne tient pas compte de la durée spécifiée et vibre pendant un temps prédéterminé. + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows et les bizarreries de Blackberry + +* **temps**: temps Max est 5000ms (5 s) et heure min est de 1 ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### Vibrer avec un motif (Android et Windows uniquement) + +Vibre l'appareil avec un motif donné + + navigator.vibrate(pattern); + + +* **modèle**: séquence de la durée (en millisecondes) pour lequel activer ou désactiver le vibreur. *(Tableau de nombres)* + +#### Exemple + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### Annuler les vibrations (ne pas de prise en charge d'iOS) + +Immédiatement annule des vibrations en cours d'exécution. + + navigator.vibrate(0) + + +ou + + navigator.vibrate([]) + + +ou + + navigator.vibrate([0]) + + +En passant un paramètre de 0, un tableau vide, ou un tableau contenant un seul élément de valeur 0 annulera toute vibration. + +## *notification.VIBRATE (obsolète) + +Vibre l'appareil pendant un certain temps. + + navigator.notification.vibrate(time) + + +* **temps**: millisecondes à vibrer l'appareil. *(Nombre)* + +### Exemple + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS Quirks + +* **temps**: ne tient pas compte de la durée spécifiée et vibre pendant un temps prédéterminé. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *notification.vibrateWithPattern (obsolète) + +Vibre l'appareil avec un modèle donné. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **modèle**: séquence de la durée (en millisecondes) pour lequel activer ou désactiver le vibreur. *(Tableau de nombres)* +* **répéter**: optionnel index dans le tableau de configuration à laquelle commencer à répéter (répétera jusqu'à annulation), ou -1 pour aucune répétition (par défaut). *(Nombre)* + +### Exemple + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *notification.cancelVibration (obsolète) + +Immédiatement annule des vibrations en cours d'exécution. + + navigator.notification.cancelVibration() + + +* Remarque : en raison de l'alignement avec les spécifications w3c, les méthodes étoilées seront progressivement \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,175 @@ + + +# org.apache.cordova.vibration + +This plugin aligns with the W3C vibration specification http://www.w3.org/TR/vibration/ + +This plugin provides a way to vibrate the device. + +This plugin defines global objects including `navigator.vibrate`. + +Although in the global scope, they are not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(navigator.vibrate); + } + +## Installation + + cordova plugin add org.apache.cordova.vibration + +## Supported Platforms + +navigator.vibrate,
+navigator.notification.vibrate +- Amazon Fire OS +- Android +- BlackBerry 10 +- Firefox OS +- iOS +- Windows Phone 7 and 8 + +navigator.notification.vibrateWithPattern,
navigator.notification.cancelVibration +- Android +- Windows Phone 8 + +## vibrate (recommended) + +This function has three different functionalities based on parameters passed to it. + +###Standard vibrate + +Vibrates the device for a given amount of time. + + navigator.vibrate(time) + +or + + navigator.vibrate([time]) + + +-__time__: Milliseconds to vibrate the device. _(Number)_ + +####Example + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + +####iOS Quirks + +- __time__: Ignores the specified time and vibrates for a pre-set amount of time. + + navigator.vibrate(3000); // 3000 is ignored + +####Windows and Blackberry Quirks + +- __time__: Max time is 5000ms (5s) and min time is 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +###Vibrate with a pattern (Android and Windows only) +Vibrates the device with a given pattern + + navigator.vibrate(pattern); + +- __pattern__: Sequence of durations (in milliseconds) for which to turn on or off the vibrator. _(Array of Numbers)_ + +####Example + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + +####Windows Phone 8 Quirks + +- vibrate(pattern) falls back on vibrate with default duration + +###Cancel vibration (not supported in iOS) + +Immediately cancels any currently running vibration. + + navigator.vibrate(0) + +or + + navigator.vibrate([]) + +or + + navigator.vibrate([0]) + +Passing in a parameter of 0, an empty array, or an array with one element of value 0 will cancel any vibrations. + +## *notification.vibrate (deprecated) + +Vibrates the device for a given amount of time. + + navigator.notification.vibrate(time) + +- __time__: Milliseconds to vibrate the device. _(Number)_ + +### Example + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + +### iOS Quirks + +- __time__: Ignores the specified time and vibrates for a pre-set amount of time. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + +## *notification.vibrateWithPattern (deprecated) + +Vibrates the device with a given pattern. + + navigator.notification.vibrateWithPattern(pattern, repeat) + +- __pattern__: Sequence of durations (in milliseconds) for which to turn on or off the vibrator. _(Array of Numbers)_ +- __repeat__: Optional index into the pattern array at which to start repeating (will repeat until canceled), or -1 for no repetition (default). _(Number)_ + +### Example + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + +## *notification.cancelVibration (deprecated) + +Immediately cancels any currently running vibration. + + navigator.notification.cancelVibration() + +*Note - due to alignment with w3c spec, the starred methods will be phased out diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/it/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Questo plugin si allinea con il W3C vibrazione specifica http://www.w3.org/TR/vibration/ + +Questo plugin consente di vibrare il dispositivo. + +## Installazione + + cordova plugin add org.apache.cordova.vibration + + +## Piattaforme supportate + +Navigator.vibrate +Navigator.Notification.vibrate - Amazon fuoco OS - OS di Firefox - 10 BlackBerry - Android - iOS - Windows Phone 7 e 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## vibrare (consigliato) + +Questa funzione ha tre differenti funzionalità basate su parametri passati ad esso. + +### Standard vibrare + +Vibra il dispositivo per un determinato periodo di tempo. + + navigator.vibrate(time) + + +o + + navigator.vibrate([time]) + + +-**tempo**: millisecondi a vibrare il dispositivo. *(Numero)* + +#### Esempio + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS stranezze + +* **tempo**: ignora il tempo specificato e vibra per un tempo pre-impostato. + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows e stranezze di Blackberry + +* **tempo**: tempo Max 5000ms (5s) edè min tempo di 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### Vibrare con un pattern (Android e solo per Windows) + +Vibra il dispositivo con un determinato modello + + navigator.vibrate(pattern); + + +* **modello**: sequenza di durate (in millisecondi) per il quale attivare o disattivare il vibratore. *(Matrice di numeri)* + +#### Esempio + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### Annullare le vibrazioni (non supportata in iOS) + +Annulla immediatamente qualsiasi vibrazione attualmente in esecuzione. + + navigator.vibrate(0) + + +o + + navigator.vibrate([]) + + +o + + navigator.vibrate([0]) + + +Passa un parametro 0, matrice vuota o una matrice con un elemento di valore 0 annullerà eventuali vibrazioni. + +## *Notification.vibrate (obsoleto) + +Vibra il dispositivo per un determinato periodo di tempo. + + navigator.notification.vibrate(time) + + +* **tempo**: millisecondi a vibrare il dispositivo. *(Numero)* + +### Esempio + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS stranezze + +* **tempo**: ignora il tempo specificato e vibra per un tempo pre-impostato. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *Notification.vibrateWithPattern (obsoleto) + +Vibra il dispositivo con un determinato modello. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **modello**: sequenza di durate (in millisecondi) per il quale attivare o disattivare il vibratore. *(Matrice di numeri)* +* **ripetere**: opzionale indice nell'array modello presso cui iniziare ripetendo (ripeterà finché non annullato), o -1 per nessuna ripetizione (impostazione predefinita). *(Numero)* + +### Esempio + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *Notification.cancelVibration (obsoleto) + +Annulla immediatamente qualsiasi vibrazione attualmente in esecuzione. + + navigator.notification.cancelVibration() + + +* Nota - a causa di allineamento con le specifiche w3c, saranno essere ritirati i metodi speciali \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ja/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +このプラグインに準拠 W3C 振動仕様 http://www.w3.org/TR/vibration/ + +このプラグインは、デバイスを振動させる方法を提供します。 + +## インストール + + cordova plugin add org.apache.cordova.vibration + + +## サポートされているプラットフォーム + +navigator.vibrate +navigator.notification.vibrate - アマゾン火 OS - アンドロイド - ブラックベリー 10 - Firefox OS - iOS - Windows Phone 7 と 8 + +navigator.notification.vibrateWithPattern、 +navigator.notification.cancelVibration - アンドロイド + +## 振動 (推奨) + +この関数は、渡されたパラメーターに基づいて 3 つのさまざまな機能。 + +### 標準を振動します。 + +一定の時間のため、デバイスが振動します。 + + navigator.vibrate(time) + + +または + + navigator.vibrate([time]) + + +-**時刻**: ミリ秒、デバイスを振動させる。*(数)* + +#### 例 + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS の癖 + +* **時間**: 指定された時間を無視し、時間の事前に設定された量のために振動します。 + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows とブラックベリー癖 + +* **時間**: 5000 (5 秒) は、最大時間と最小時間は 1 ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### (人造人間と Windows のみ) パターンで振動します。 + +特定のパターンを持つデバイスが振動します。 + + navigator.vibrate(pattern); + + +* **パターン**: シーケンスの継続時間 (ミリ秒単位) をオンまたはオフ、バイブします。*(数字の配列)* + +#### 例 + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### [キャンセル] 振動 (iOS ではサポートされていません) + +すぐに、現在実行中の振動をキャンセルします。 + + navigator.vibrate(0) + + +または + + navigator.vibrate([]) + + +または + + navigator.vibrate([0]) + + +0 のパラメーターを渡して、空の配列、または 0 の値の 1 つの要素を持つ配列は任意振動がキャンセルされます。 + +## *notification.vibrate (非推奨) + +一定の時間のため、デバイスが振動します。 + + navigator.notification.vibrate(time) + + +* **時刻**: ミリ秒、デバイスを振動させる。*(数)* + +### 例 + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS の癖 + +* **時間**: 指定された時間を無視し、時間の事前に設定された量のために振動します。 + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *notification.vibrateWithPattern (非推奨) + +特定のパターンを持つデバイスが振動します。 + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **パターン**: シーケンスの継続時間 (ミリ秒単位) をオンまたはオフ、バイブします。*(数字の配列)* +* **繰り返します**: 省略可能な配列のインデックスのパターン (でしょう) を繰り返す取り消されるまで、繰り返しを開始するまたは反復なし (既定値) の場合は-1。*(数)* + +### 例 + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *notification.cancelVibration (非推奨) + +すぐに、現在実行中の振動をキャンセルします。 + + navigator.notification.cancelVibration() + + +* 注 - w3c の仕様を配置、ため主演メソッドがフェーズ アウトされます。 \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ko/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +이 플러그인에 W3C 진동 사양 http://www.w3.org/TR/vibration/ 정렬 + +이 플러그인에는 장치를 진동 하는 방법을 제공 합니다. + +## 설치 + + cordova plugin add org.apache.cordova.vibration + + +## 지원 되는 플랫폼 + +navigator.vibrate +navigator.notification.vibrate-아마존 화재 OS-안 드 로이드-블랙베리 10-파이어 폭스 OS-iOS-Windows Phone 7과 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration-안 드 로이드 + +## 진동 (권장) + +이 함수는 전달 된 매개 변수에 따라 세 가지 다른 기능. + +### 기준 진동 + +주어진 시간 동안 장치를 진동. + + navigator.vibrate(time) + + +또는 + + navigator.vibrate([time]) + + +-**시간**: 진동 장치 (밀리초)입니다. *(수)* + +#### 예를 들어 + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS 단점 + +* **시간**: 지정 된 시간을 무시 하 고 미리 설정 된 시간 동안 진동. + + navigator.vibrate(3000); // 3000 is ignored + +#### 윈도 즈와 블랙베리 단점 + +* **시간**: 최대 시간은 2000ms (5s) 이며 최소 시간 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### (안 드 로이드와 Windows에만 해당) 패턴으로 진동 + +지정 된 패턴으로 장치를 진동 + + navigator.vibrate(pattern); + + +* **패턴**:의 기간 (밀리초)에서 진동을 켜거나 끌 수 있는 순서. *(숫자의 배열)* + +#### 예를 들어 + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### 진동 (iOS에서 지원 되지 않음) 취소 + +즉시 모든 현재 실행 중인 진동을 취소합니다. + + navigator.vibrate(0) + + +또는 + + navigator.vibrate([]) + + +또는 + + navigator.vibrate([0]) + + +0의 매개 변수 전달, 빈 배열, 또는 0 값의 한 요소 배열은 어떤 진동을 취소할 것 이다. + +## *notification.vibrate (사용 되지 않음) + +주어진 시간 동안 장치를 진동. + + navigator.notification.vibrate(time) + + +* **시간**: 진동 장치 (밀리초)입니다. *(수)* + +### 예를 들어 + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS 단점 + +* **시간**: 지정 된 시간을 무시 하 고 미리 설정 된 시간 동안 진동. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *notification.vibrateWithPattern (사용 되지 않음) + +지정 된 패턴으로 장치 진동. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **패턴**:의 기간 (밀리초)에서 진동을 켜거나 끌 수 있는 순서. *(숫자의 배열)* +* **반복**: 반복 (취소 될 때까지 반복 됩니다), 시작 하는 또는-1 (기본값) 없는 반복에 대 한 패턴 배열에 선택적 인덱스. *(수)* + +### 예를 들어 + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *notification.cancelVibration (사용 되지 않음) + +즉시 모든 현재 실행 중인 진동을 취소합니다. + + navigator.notification.cancelVibration() + + +* 참고-때문에 w3c 사양 가진 줄 맞춤, 별표 메서드 밖으로 단계별로 됩니다. \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/pl/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Ten plugin wyrównuje z http://www.w3.org/TR/vibration/ specyfikacji W3C wibracji + +Ten plugin umożliwia wibracje urządzenia. + +## Instalacja + + cordova plugin add org.apache.cordova.vibration + + +## Obsługiwane platformy + +Navigator.vibrate +Navigator.Notification.vibrate - Amazon ogień OS - OS Android - BlackBerry 10 - Firefox - iOS - Windows Phone 7 i 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## wibracje (zalecane) + +Funkcja ta ma trzy różne funkcje na podstawie parametrów przekazywanych do niej. + +### Standardowe wibracje + +Wibruje urządzenie na określoną ilość czasu. + + navigator.vibrate(time) + + +lub + + navigator.vibrate([time]) + + +-**czas**: milisekund wibracje urządzenia. *(Liczba)* + +#### Przykład + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### Dziwactwa iOS + +* **czas**: ignoruje określony czas i wibruje na wstępnie określoną ilość czasu. + + Navigator.vibrate(3000); 3000 jest ignorowany + +#### Windows i Blackberry dziwactwa + +* **czas**: Max czas jest 5000ms (5s) i min czas 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### Wibracje z wzorem (Android i Windows tylko) + +Wibruje urządzenie z danego wzoru + + navigator.vibrate(pattern); + + +* **wzór**: sekwencja czas trwania (w milisekundach), dla której chcesz włączyć lub wyłączyć wibrator. *(Tablica liczb)* + +#### Przykład + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### Anuluj wibracji (nieobsługiwane w iOS) + +Niezwłocznie anuluje aktualnie uruchomione wibracje. + + navigator.vibrate(0) + + +lub + + navigator.vibrate([]) + + +lub + + navigator.vibrate([0]) + + +Przekazując parametr 0, pustą tablicę lub tablicy z jednym z elementów wartości 0 spowoduje anulowanie wibracji. + +## *Notification.vibrate (przestarzałe) + +Wibruje urządzenie na określoną ilość czasu. + + navigator.notification.vibrate(time) + + +* **czas**: milisekund wibracje urządzenia. *(Liczba)* + +### Przykład + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### Dziwactwa iOS + +* **czas**: ignoruje określony czas i wibruje na wstępnie określoną ilość czasu. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *Notification.vibrateWithPattern (przestarzałe) + +Wibruje urządzenie z danego wzoru. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **wzór**: sekwencja czas trwania (w milisekundach), dla której chcesz włączyć lub wyłączyć wibrator. *(Tablica liczb)* +* **Powtórz**: opcjonalny indeks do tablicy wzór który zacząć powtarzać (będzie powtarzać do momentu anulowane), lub -1 nie powtarzania (domyślnie). *(Liczba)* + +### Przykład + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *Notification.cancelVibration (przestarzałe) + +Niezwłocznie anuluje aktualnie uruchomione wibracje. + + navigator.notification.cancelVibration() + + +* Uwaga - ze względu na dostosowanie specyfikacji w3c, oznaczonych gwiazdką metody zostaną wycofane \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ru/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +Этот плагин выравнивает с http://www.w3.org/TR/vibration/ спецификации W3C вибрации + +Этот плагин позволяет вибрировать устройство. + +## Установка + + cordova plugin add org.apache.cordova.vibration + + +## Поддерживаемые платформы + +Navigator.Vibrate +Navigator.Notification.Vibrate - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 и 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration - Android + +## вибрировать (рекомендуется) + +Эта функция имеет три различных функций, на основе параметров, передаваемых ему. + +### Стандарт вибрировать + +Устройство вибрирует за определенное количество времени. + + navigator.vibrate(time) + + +или + + navigator.vibrate([time]) + + +-**time**: Сколько миллисекунд будет вибрировать устройство. *(Число)* + +#### Пример + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### Особенности iOS + +* **time**: игнорирует указанное время и вибрирует предопределенный отрезок времени. + + navigator.vibrate(3000); // 3000 is ignored + +#### Окна и Blackberry причуды + +* **время**: время Макс 5000ms (5с) и минимальное время 1 мс + + navigator.vibrate(8000); // will be truncated to 5000 + +### Вибрировать с узором (Android и Windows только) + +Вибрирует на устройства с заданным шаблоном + + navigator.vibrate(pattern); + + +* **шаблон**: последовательность длительностей (в миллисекундах), для которого требуется включить или выключить вибростол. *(Массив из чисел)* + +#### Пример + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### Отмена вибрации (не поддерживается в iOS) + +Немедленно отменяет любые выполняющиеся вибрации. + + navigator.vibrate(0) + + +или + + navigator.vibrate([]) + + +или + + navigator.vibrate([0]) + + +Проходя в параметре 0, пустой массив, или массив с одним элементом значения 0 будет отменить любые вибрации. + +## *Notification.Vibrate (устарело) + +Устройство вибрирует за определенное количество времени. + + navigator.notification.vibrate(time) + + +* **time**: Сколько миллисекунд будет вибрировать устройство. *(Число)* + +### Пример + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### Особенности iOS + +* **time**: игнорирует указанное время и вибрирует предопределенный отрезок времени. + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *Notification.vibrateWithPattern (устарело) + +Вибрирует на устройства с заданным шаблоном. + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **шаблон**: последовательность длительностей (в миллисекундах), для которого требуется включить или выключить вибростол. *(Массив из чисел)* +* **повторяю**: дополнительный индекс в массиве шаблон для начала повторять (будет повторять пока не отменен), или -1 для не повторения (по умолчанию). *(Число)* + +### Пример + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *Notification.cancelVibration (устарело) + +Немедленно отменяет любые выполняющиеся вибрации. + + navigator.notification.cancelVibration() + + +* Обратите внимание - из-за соответствие спецификации w3c, Избранные методы будут поэтапно \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/zh/index.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,170 @@ + + +# org.apache.cordova.vibration + +這個外掛程式將對齊與 W3C 振動規範 HTTP://www.w3.org/TR/vibration/ + +這個外掛程式提供了方法振動設備。 + +## 安裝 + + cordova plugin add org.apache.cordova.vibration + + +## 支援的平臺 + +navigator.vibrate +navigator.notification.vibrate-亞馬遜火 OS-Android-黑莓 10-火狐瀏覽器作業系統 — — iOS-Windows Phone 7 和 8 + +navigator.notification.vibrateWithPattern, +navigator.notification.cancelVibration-安卓系統 + +## 震動 (推薦) + +此函數具有三個不同的功能,基於參數傳遞給它。 + +### 標準振動 + +為給定時間振動設備。 + + navigator.vibrate(time) + + +或 + + navigator.vibrate([time]) + + +-**時間**: 毫秒以振動裝置。*(人數)* + +#### 示例 + + // Vibrate for 3 seconds + navigator.vibrate(3000); + + // Vibrate for 3 seconds + navigator.vibrate([3000]); + + +#### iOS 的怪癖 + +* **時間**: 忽略指定的時間和震動的一個預先設定的時間。 + + navigator.vibrate(3000); // 3000 is ignored + +#### Windows 和黑莓的怪癖 + +* **時間**: 最長時間是 5000ms (5s) 和最小時間為 1ms + + navigator.vibrate(8000); // will be truncated to 5000 + +### 以一種模式 (安卓系統和僅限 Windows) 振動 + +振動具有給定模式的設備 + + navigator.vibrate(pattern); + + +* **模式**: 序列的持續時間 (以毫秒為單位) 為其打開或關閉振動器。*(數位陣列)* + +#### 示例 + + // Vibrate for 1 second + // Wait for 1 second + // Vibrate for 3 seconds + // Wait for 1 second + // Vibrate for 5 seconds + navigator.vibrate([1000, 1000, 3000, 1000, 5000]); + + +### 取消振動 (iOS 中不支援) + +立即取消任何當前正在運行的振動。 + + navigator.vibrate(0) + + +或 + + navigator.vibrate([]) + + +或 + + navigator.vibrate([0]) + + +在一個為 0 的參數中傳遞,空陣列或陣列的一個元素的值為 0 將取消任何振動。 + +## *notification.vibrate (已棄用) + +為給定時間振動設備。 + + navigator.notification.vibrate(time) + + +* **時間**: 毫秒以振動裝置。*(人數)* + +### 示例 + + // Vibrate for 2.5 seconds + navigator.notification.vibrate(2500); + + +### iOS 的怪癖 + +* **時間**: 忽略指定的時間和震動的一個預先設定的時間。 + + navigator.notification.vibrate(); + navigator.notification.vibrate(2500); // 2500 is ignored + + +## *notification.vibrateWithPattern (已棄用) + +振動具有給定模式的設備。 + + navigator.notification.vibrateWithPattern(pattern, repeat) + + +* **模式**: 序列的持續時間 (以毫秒為單位) 為其打開或關閉振動器。*(數位陣列)* +* **重複**: 在其開始重複 (會重複,直到被取消),或-1 為不重複 (預設值) 模式陣列中的可選索引。*(人數)* + +### 示例 + + // Immediately start vibrating + // vibrate for 100ms, + // wait for 100ms, + // vibrate for 200ms, + // wait for 100ms, + // vibrate for 400ms, + // wait for 100ms, + // vibrate for 800ms, + // (do not repeat) + navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]); + + +## *notification.cancelVibration (已棄用) + +立即取消任何當前正在運行的振動。 + + navigator.notification.cancelVibration() + + +* 請注意--對齊方式與 w3c 規範,因出演的方法將被淘汰 \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,137 @@ + + + + + + Vibration + Cordova Vibration Plugin + Apache 2.0 + cordova,vibration + https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git + https://issues.apache.org/jira/browse/CB/component/12320639 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/android/Vibration.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/android/Vibration.java Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,126 @@ +/* + 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. +*/ +package org.apache.cordova.vibration; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONException; +import android.content.Context; +import android.os.Vibrator; + +/** + * This class provides access to vibration on the device. + */ +public class Vibration extends CordovaPlugin { + + /** + * Constructor. + */ + public Vibration() { + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArray of arguments for the plugin. + * @param callbackContext The callback context used when calling back into JavaScript. + * @return True when the action was valid, false otherwise. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + if (action.equals("vibrate")) { + this.vibrate(args.getLong(0)); + } + else if (action.equals("vibrateWithPattern")) { + JSONArray pattern = args.getJSONArray(0); + int repeat = args.getInt(1); + //add a 0 at the beginning of pattern to align with w3c + long[] patternArray = new long[pattern.length()+1]; + patternArray[0] = 0; + for (int i = 0; i < pattern.length(); i++) { + patternArray[i+1] = pattern.getLong(i); + } + this.vibrateWithPattern(patternArray, repeat); + } + else if (action.equals("cancelVibration")) { + this.cancelVibration(); + } + else { + return false; + } + + // Only alert and confirm are async. + callbackContext.success(); + + return true; + } + + //-------------------------------------------------------------------------- + // LOCAL METHODS + //-------------------------------------------------------------------------- + + /** + * Vibrates the device for a given amount of time. + * + * @param time Time to vibrate in ms. + */ + public void vibrate(long time) { + // Start the vibration, 0 defaults to half a second. + if (time == 0) { + time = 500; + } + Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE); + vibrator.vibrate(time); + } + + /** + * Vibrates the device with a given pattern. + * + * @param pattern Pattern with which to vibrate the device. + * Pass in an array of longs that + * are the durations for which to + * turn on or off the vibrator in + * milliseconds. The first value + * indicates the number of milliseconds + * to wait before turning the vibrator + * on. The next value indicates the + * number of milliseconds for which + * to keep the vibrator on before + * turning it off. Subsequent values + * alternate between durations in + * milliseconds to turn the vibrator + * off or to turn the vibrator on. + * + * @param repeat Optional index into the pattern array at which + * to start repeating, or -1 for no repetition (default). + */ + public void vibrateWithPattern(long[] pattern, int repeat) { + Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE); + vibrator.vibrate(pattern, repeat); + } + + /** + * Immediately cancels any currently running vibration. + */ + public void cancelVibration() { + Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE); + vibrator.cancel(); + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,80 @@ +/* + * + * 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. + * +*/ + +var vibration; + +module.exports = { + vibrate: function (success, fail, args, env) { + var result = new PluginResult(args, env), + duration = args[0], + response = vibration.getInstance().vibrate(duration); + result.ok(response, false); + } +}; + +/////////////////////////////////////////////////////////////////// +// JavaScript wrapper for JNEXT plugin +/////////////////////////////////////////////////////////////////// + +JNEXT.Vibration = function () { + var self = this, + hasInstance = false; + + self.vibrate = function (duration) { + //This is how Javascript calls into native + return JNEXT.invoke(self.m_id, "vibrate " + duration); + }; + + self.init = function () { + //Checks that the jnext library is present and loads it + if (!JNEXT.require("libVibration")) { + return false; + } + + //Creates the native object that this interface will call + self.m_id = JNEXT.createObject("libVibration.Vibration"); + + if (self.m_id === "") { + return false; + } + + //Registers for the JNEXT event loop + JNEXT.registerEvents(self); + }; + + self.m_id = ""; + + //Used by JNEXT library to get the ID + self.getId = function () { + return self.m_id; + }; + + //Not truly required but useful for instance management + self.getInstance = function () { + if (!hasInstance) { + self.init(); + hasInstance = true; + } + return self; + }; +}; + +vibration = new JNEXT.Vibration(); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/device/libVibration.so Binary file Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/device/libVibration.so has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,341 @@ +/* + * + * 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. + * +*/ + +#include "plugin.h" +#include "tokenizer.h" + +#ifdef _WINDOWS +#include +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved ) +{ + return TRUE; +} +#else +#include +#include + +extern int errno; +#endif + +SendPluginEv SendPluginEvent; + +string g_GetSysErrMsg( void ) +{ + string strError = "Unknown"; + // Problem loading +#ifdef _WINDOWS + int nErrorCode = GetLastError(); + LPTSTR s; + if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) ) + { + strError = s; + } + else + { + char szBuf[ 20 ]; + _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode ); + strError = szBuf; + } +#else + char szError[80]; + if ( strerror_r( errno, szError, sizeof(szError) ) ) + { + strError = "no description found"; + } + else + { + strError = szError; + } +#endif + return strError; +} + +void g_sleep( unsigned int mseconds ) +{ +#ifdef _WINDOWS + Sleep( mseconds ); +#else + usleep( mseconds * 1000 ); +#endif +} + +string& g_trim( string& str ) +{ + // Whitespace characters + char whspc[] = " \t\r\n\v\f"; + + // Whack off first part + size_t pos = str.find_first_not_of( whspc ); + + if ( pos != string::npos ) + str.replace( 0, pos, "" ); + + // Whack off trailing stuff + pos = str.find_last_not_of( whspc ); + + if ( pos != string::npos ) + str.replace( pos + 1, str.length() - pos, "" ); + + return str; +} + +void g_tokenize( const string& str, const string& delimiters, vector& tokens ) +{ + tokenize( str, tokens, delimiters ); +} + +char* SetEventFunc( SendPluginEv funcPtr ) +{ + static char * szObjList = onGetObjList(); + SendPluginEvent = funcPtr; + return szObjList; +} + + +const int nMAXSIZE = 512; +char* g_pszRetVal = NULL; + +//----------------------------------------------------------- +// Map from an object Id to an object instance +//----------------------------------------------------------- +typedef std::map StringToJExt_T; + +//----------------------------------------------------------- +// Map from a browser context to an id mapping +//----------------------------------------------------------- +typedef std::map VoidToMap_T; + +VoidToMap_T g_context2Map; + +class GlobalSharedModule +{ + +public: + GlobalSharedModule( void ) + { + g_pszRetVal = new char[ nMAXSIZE ]; + } + + ~GlobalSharedModule() + { + delete [] g_pszRetVal; + + VoidToMap_T::iterator posMaps; + + for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps ) + { + StringToJExt_T& id2Obj = *posMaps->second; + StringToJExt_T::iterator posMap; + + for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap ) + { + JSExt* pJSExt = posMap->second; + + if ( pJSExt->CanDelete() ) + { + delete pJSExt; + } + } + + id2Obj.erase( id2Obj.begin(), id2Obj.end() ); + } + + g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() ); + } +}; + +GlobalSharedModule g_sharedModule; + +char* g_str2global( const string& strRetVal ) +{ + int nLen = strRetVal.size(); + + if ( nLen >= nMAXSIZE ) + { + delete [] g_pszRetVal; + g_pszRetVal = new char[ nLen + 1 ]; + } + + else + { + // To minimaize the number of memory reallocations, the assumption + // is that in most times this will be the case + delete [] g_pszRetVal; + g_pszRetVal = new char[ nMAXSIZE ]; + } + + strcpy( g_pszRetVal, strRetVal.c_str() ); + return g_pszRetVal; +} + +bool g_unregisterObject( const string& strObjId, void* pContext ) +{ + // Called by the plugin extension implementation + // if the extension handles the deletion of its object + + StringToJExt_T * pID2Obj = NULL; + + VoidToMap_T::iterator iter = g_context2Map.find( pContext ); + + if ( iter != g_context2Map.end() ) + { + pID2Obj = iter->second; + } + else + { + return false; + } + + StringToJExt_T& mapID2Obj = *pID2Obj; + + StringToJExt_T::iterator r = mapID2Obj.find( strObjId ); + + if ( r == mapID2Obj.end() ) + { + return false; + } + + mapID2Obj.erase( strObjId ); + return true; +} + +char* InvokeFunction( const char* szCommand, void* pContext ) +{ + StringToJExt_T * pID2Obj = NULL; + + VoidToMap_T::iterator iter = g_context2Map.find( pContext ); + + if ( iter != g_context2Map.end() ) + { + pID2Obj = iter->second; + } + else + { + pID2Obj = new StringToJExt_T; + g_context2Map[ pContext ] = pID2Obj; + } + + StringToJExt_T& mapID2Obj = *pID2Obj; + + string strFullCommand = szCommand; + vector arParams; + g_tokenize( strFullCommand, " ", arParams ); + string strCommand = arParams[ 0 ]; + string strRetVal = szERROR; + + if ( strCommand == szCREATE ) + { + string strClassName = arParams[ 1 ]; + string strObjId = arParams[ 2 ]; + + StringToJExt_T::iterator r = mapID2Obj.find( strObjId ); + + if ( r != mapID2Obj.end() ) + { + strRetVal += strObjId; + strRetVal += " :Object already exists."; + return g_str2global( strRetVal ); + } + + JSExt* pJSExt = onCreateObject( strClassName, strObjId ); + + if ( pJSExt == NULL ) + { + strRetVal += strObjId; + strRetVal += " :Unknown object type "; + strRetVal += strClassName; + return g_str2global( strRetVal ); + } + + pJSExt->m_pContext = pContext; + mapID2Obj[ strObjId ] = pJSExt; + + strRetVal = szOK; + strRetVal += strObjId; + return g_str2global( strRetVal ); + } + else + if ( strCommand == szINVOKE ) + { + string strObjId = arParams[ 1 ]; + string strMethod = arParams[ 2 ]; + + StringToJExt_T::iterator r = mapID2Obj.find( strObjId ); + + if ( r == mapID2Obj.end() ) + { + strRetVal += strObjId; + strRetVal += " :No object found for id."; + return g_str2global( strRetVal ); + } + + JSExt* pJSExt = r->second; + + size_t nLoc = strFullCommand.find( strObjId ); + + if ( nLoc == string::npos ) + { + strRetVal += strObjId; + strRetVal += " :Internal InvokeMethod error."; + return g_str2global( strRetVal ); + } + + if ( strMethod == szDISPOSE ) + { + StringToJExt_T::iterator r = mapID2Obj.find( strObjId ); + + if ( r == mapID2Obj.end() ) + { + strRetVal = szERROR; + strRetVal += strObjId; + return g_str2global( strRetVal ); + } + + JSExt * pJSExt = mapID2Obj[ strObjId ]; + + if ( pJSExt->CanDelete() ) + { + delete pJSExt; + } + + mapID2Obj.erase( strObjId ); + strRetVal = szOK; + strRetVal += strObjId; + return g_str2global( strRetVal ); + } + + size_t nSuffixLoc = nLoc + strObjId.size(); + string strInvoke = strFullCommand.substr( nSuffixLoc ); + strInvoke = g_trim( strInvoke ); + strRetVal = pJSExt->InvokeMethod( strInvoke ); + return g_str2global( strRetVal ); + } + + strRetVal += " :Unknown command "; + strRetVal += strCommand; + return g_str2global( strRetVal ); +} + +//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,91 @@ +/* + * + * 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. + * +*/ + +#ifndef _PLUGIN_H +#define _PLUGIN_H + +#include +#include +#include +#include +//#include "tokenizer.h" + +using namespace std; + +//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +//%% Functions exported by this DLL +//%% Should always be only SetEventFunc and InvokeFunction +//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction +// are mangled C++ style. MS Visual Studio doesn't seem to care though. +extern "C" +{ + typedef void (*SendPluginEv)( const char* szEvent, void* pContext ); + char* SetEventFunc(SendPluginEv funcPtr); + char* InvokeFunction( const char* szCommand, void* pContext ); +} + +// JNEXT Framework function of the form: +// typedef void (*SendPluginEv)( const char* szEvent ); +// used to notify JavaScript of an asynchronous event +extern SendPluginEv SendPluginEvent; + +///////////////////////////////////////////////////////////////////////// +// Constants and methods common to all JNEXT extensions types +///////////////////////////////////////////////////////////////////////// +#define szERROR "Error " +#define szOK "Ok " + +#define szDISPOSE "Dispose" +#define szINVOKE "InvokeMethod" +#define szCREATE "CreateObj" + +///////////////////////////////////////////////////////////////////////// +// Utility functions +///////////////////////////////////////////////////////////////////////// +string& g_trim( string& str ); +void g_tokenize(const string& str,const string& delimiters, vector& tokens); +char* g_str2static( const string& strRetVal ); +void g_sleep( unsigned int mseconds ); +bool g_unregisterObject( const string& strObjId, void* pContext ); + + +///////////////////////////////////////////////////////////////////////// +// Abstract extension object +///////////////////////////////////////////////////////////////////////// +class JSExt +{ +public: + virtual ~JSExt() {}; + virtual string InvokeMethod( const string& strCommand ) = 0; + virtual bool CanDelete( void ) = 0; + virtual void TryDelete( void ) {} +public: + void* m_pContext; +}; + +///////////////////////////////////////////////////////////////////////// +// Callback functions to be implemented by the plugin implementation +///////////////////////////////////////////////////////////////////////// +extern char* onGetObjList( void ); +extern JSExt* onCreateObject( const string& strClassName, const string& strObjId ); + +#endif diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/tokenizer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/tokenizer.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,222 @@ +/************************************************************************ +The zlib/libpng License + +Copyright (c) 2006 Joerg Wiedenmann + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from +the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; +you must not claim that you wrote the original software. +If you use this software in a product, an acknowledgment +in the product documentation would be appreciated but is +not required. + +2. Altered source versions must be plainly marked as such, +and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + +***********************************************************************/ + +/******************************************************************** + created: 2006-01-28 + filename: tokenizer.cpp + author: Jrg Wiedenmann + + purpose: A tokenizer function which provides a very + customizable way of breaking up strings. + + history: 2006-01-28, Original version + 2006-03-04, Fixed a small parsing bug, thanks Elias. +*********************************************************************/ + +#include "tokenizer.h" + +using namespace std; + +void tokenize ( const string& str, vector& result, + const string& delimiters, const string& delimiters_preserve, + const string& quote, const string& esc ) +{ + // clear the vector + if ( false == result.empty() ) + { + result.clear(); + } + + string::size_type pos = 0; // the current position (char) in the string + char ch = 0; // buffer for the current character + char delimiter = 0; // the buffer for the delimiter char which + // will be added to the tokens if the delimiter + // is preserved + char current_quote = 0; // the char of the current open quote + bool quoted = false; // indicator if there is an open quote + string token; // string buffer for the token + bool token_complete = false; // indicates if the current token is + // read to be added to the result vector + string::size_type len = str.length(); // length of the input-string + + // for every char in the input-string + while ( len > pos ) + { + // get the character of the string and reset the delimiter buffer + ch = str.at(pos); + delimiter = 0; + + // assume ch isn't a delimiter + bool add_char = true; + + // check ... + + // ... if the delimiter is an escaped character + bool escaped = false; // indicates if the next char is protected + if ( false == esc.empty() ) // check if esc-chars are provided + { + if ( string::npos != esc.find_first_of(ch) ) + { + // get the escaped char + ++pos; + if ( pos < len ) // if there are more chars left + { + // get the next one + ch = str.at(pos); + + // add the escaped character to the token + add_char = true; + } + else // cannot get any more characters + { + // don't add the esc-char + add_char = false; + } + + // ignore the remaining delimiter checks + escaped = true; + } + } + + // ... if the delimiter is a quote + if ( false == quote.empty() && false == escaped ) + { + // if quote chars are provided and the char isn't protected + if ( string::npos != quote.find_first_of(ch) ) + { + // if not quoted, set state to open quote and set + // the quote character + if ( false == quoted ) + { + quoted = true; + current_quote = ch; + + // don't add the quote-char to the token + add_char = false; + } + else // if quote is open already + { + // check if it is the matching character to close it + if ( current_quote == ch ) + { + // close quote and reset the quote character + quoted = false; + current_quote = 0; + + // don't add the quote-char to the token + add_char = false; + } + } // else + } + } + + // ... if the delimiter isn't preserved + if ( false == delimiters.empty() && false == escaped && + false == quoted ) + { + // if a delimiter is provided and the char isn't protected by + // quote or escape char + if ( string::npos != delimiters.find_first_of(ch) ) + { + // if ch is a delimiter and the token string isn't empty + // the token is complete + if ( false == token.empty() ) // BUGFIX: 2006-03-04 + { + token_complete = true; + } + + // don't add the delimiter to the token + add_char = false; + } + } + + // ... if the delimiter is preserved - add it as a token + bool add_delimiter = false; + if ( false == delimiters_preserve.empty() && false == escaped && + false == quoted ) + { + // if a delimiter which will be preserved is provided and the + // char isn't protected by quote or escape char + if ( string::npos != delimiters_preserve.find_first_of(ch) ) + { + // if ch is a delimiter and the token string isn't empty + // the token is complete + if ( false == token.empty() ) // BUGFIX: 2006-03-04 + { + token_complete = true; + } + + // don't add the delimiter to the token + add_char = false; + + // add the delimiter + delimiter = ch; + add_delimiter = true; + } + } + + + // add the character to the token + if ( true == add_char ) + { + // add the current char + token.push_back( ch ); + } + + // add the token if it is complete + if ( true == token_complete && false == token.empty() ) + { + // add the token string + result.push_back( token ); + + // clear the contents + token.clear(); + + // build the next token + token_complete = false; + } + + // add the delimiter + if ( true == add_delimiter ) + { + // the next token is the delimiter + string delim_token; + delim_token.push_back( delimiter ); + result.push_back( delim_token ); + + // REMOVED: 2006-03-04, Bugfix + } + + // repeat for the next character + ++pos; + } // while + + // add the final token + if ( false == token.empty() ) + { + result.push_back( token ); + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/tokenizer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/tokenizer.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,55 @@ +/************************************************************************ +The zlib/libpng License + +Copyright (c) 2006 Joerg Wiedenmann + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from +the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + +2. Altered source versions must be plainly marked as such, + and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + +***********************************************************************/ + +/******************************************************************** + created: 2006-01-28 + filename: tokenizer.cpp + author: Jrg Wiedenmann + + purpose: A tokenizer function which provides a very + customizable way of breaking up strings. +*********************************************************************/ + +#include +#include +using namespace std; + +// Function to break up a string into tokens +// +// Parameters: +//----------- +// str = the input string that will be tokenized +// result = the tokens for str +// delimiters = the delimiter characters +// delimiters preserve = same as above, but the delimiter characters +// will be put into the result as a token +// quote = characters to protect the enclosed characters +// esc = characters to protect a single character +// + +void tokenize ( const string& str, vector& result, + const string& delimiters, const string& delimiters_preserve = "", + const string& quote = "\"", const string& esc = "\\" ); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/simulator/libVibration.so Binary file Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/simulator/libVibration.so has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/src/vibration_js.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/src/vibration_js.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,116 @@ +/* + * + * 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. + * +*/ + +#include +#include +#include +#include +#include +#include +#include "vibration_js.hpp" +#include + +using namespace std; + +/** + * Default constructor. + */ +Vibration::Vibration(const std::string& id) : m_id(id){ + bps_initialize(); +} + +/** + * Vibration destructor. + */ +Vibration::~Vibration() { + bps_shutdown(); +} + +/** + * This method returns the list of objects implemented by this native extension. + */ +char* onGetObjList() { + static char name[] = "Vibration"; + return name; +} + +/** + * This method is used by JNext to instantiate the Vibration object when + * an object is created on the JavaScript server side. + */ +JSExt* onCreateObject(const string& className, const string& id) { + if (className == "Vibration") { + return new Vibration(id); + } + return NULL; +} + +/** + * Method used by JNext to determine if the object can be deleted. + */ +bool Vibration::CanDelete() { + return true; +} + +/** + * It will be called from JNext JavaScript side with passed string. + * This method implements the interface for the JavaScript to native binding + * for invoking native code. This method is triggered when JNext.invoke is + * called on the JavaScript side with this native objects id. + */ +string Vibration::InvokeMethod(const string& command) { + + // parse command and args from string + int indexOfFirstSpace = command.find_first_of(" "); + string strCommand = command.substr(0, indexOfFirstSpace); + string strValue = command.substr(indexOfFirstSpace + 1, command.length()); + char info[1024]; + + //Process the vibrate command + if (strCommand == "vibrate") { + //Get the duration + int duration = atoi(strValue.substr(0, strValue.length()).c_str()); + + if (duration <= 0) { + //Default to 1 second + duration = 1000; + } else if (duration > 5000) { + //Max 5 seconds + duration = 5000; + } + + //Vibrate + int value = vibration_request(VIBRATION_INTENSITY_HIGH , duration); + + //Check return + if (value == BPS_SUCCESS) { + sprintf(info, "Vibration successful."); + } else if(value == BPS_FAILURE) { + sprintf(info, "Vibration failed."); + } else { + sprintf(info, "Vibration unknown error: %d", value); + } + return info; + } else { + sprintf(info, "Unsupported method: %s", strCommand.c_str()); + } + return info; +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/src/vibration_js.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/src/vibration_js.hpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,42 @@ +/* + * + * 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. + * +*/ + +#ifndef VIBRATION_JS_HPP_ +#define VIBRATION_JS_HPP_ + +#include +#include "../public/plugin.h" + +class Vibration: public JSExt { + +public: + explicit Vibration(const std::string& id); + virtual ~Vibration(); + + // Interfaces of JSExt + virtual bool CanDelete(); + virtual std::string InvokeMethod(const std::string& command); + +private: + std::string m_id; +}; + +#endif /* VIBRATION_JS_HPP_ */ diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/firefoxos/VibrationProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/firefoxos/VibrationProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,35 @@ +/* + * + * 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. + * +*/ + +var cordova = require('cordova'); + +module.exports = { + + vibrate: function(success, fail, milliseconds) { + if (navigator.notification.vibrate) { + navigator.vibrate(milliseconds); + } else { + console.log ("cordova/plugin/firefoxos/vibration, vibrate API does not exist"); + } + } +}; + +require("cordova/exec/proxy").add("Vibration", module.exports); \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/ios/CDVVibration.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/ios/CDVVibration.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,29 @@ +/* + 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. + */ + +#import +#import +#import +#import + +@interface CDVVibration : CDVPlugin {} + +- (void)vibrate:(CDVInvokedUrlCommand*)command; + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/ios/CDVVibration.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/ios/CDVVibration.m Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,29 @@ +/* + 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. + */ + +#import "CDVVibration.h" + +@implementation CDVVibration + +- (void)vibrate:(CDVInvokedUrlCommand*)command +{ + AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); +} + +@end diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/tizen/VibrationProxy.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/tizen/VibrationProxy.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,30 @@ +/* + * + * 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. + * +*/ + +module.exports = { + vibrate: function(milliseconds) { + if (navigator.vibrate) { + navigator.vibrate(milliseconds); + } + } +}; + +require("cordova/tizen/commandProxy").add("Vibration", module.exports); diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/ubuntu/vibration.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/ubuntu/vibration.cpp Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,64 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed 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. + * +*/ + +#include "vibration.h" + +void Vibration::vibrate(int, int, int mills) { + QSharedPointer vibrate = QSharedPointer::create(); + vibrate->setIntensity(1.0); + vibrate->setDuration(mills); + + vibrate->start(); + + _effects.append(vibrate); +} + +void Vibration::cancelVibration(int, int) { + _timers.clear(); + _effects.clear(); +} + +void Vibration::vibrateWithPattern(int, int, const QList &pattern, int repeat) { + QSharedPointer timer = QSharedPointer::create(); + QSharedPointer k = QSharedPointer::create(); + + QSharedPointer vibrate = QSharedPointer::create(); + vibrate->setIntensity(1.0); + + _effects.append(vibrate); + _timers.append(timer); + + timer->connect(timer.data(), &QTimer::timeout, [=, timer = timer.data()] () { + if (*k >= pattern.size()) { + if (repeat < 0 || repeat >= pattern.size()) { + timer->stop(); + return; + } + *k = repeat; + } + bool idle = (*k % 2 == 0); + if (!idle) { + vibrate->setDuration(pattern[*k]); + vibrate->start(); + } + timer->start(pattern[*k]); + (*k)++; + }); + timer->start(1); +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/ubuntu/vibration.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/ubuntu/vibration.h Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,54 @@ +/* + * + * Copyright 2013 Canonical Ltd. + * + * Licensed 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. + * +*/ + +#ifndef _VIBRATION_H_SFAFKNVX3456 +#define _VIBRATION_H_SFAFKNVX3456 + +#include +#include +#include + +class Vibration: public CPlugin { + Q_OBJECT +public: + explicit Vibration(Cordova *cordova): CPlugin(cordova) { + } + + virtual const QString fullName() override { + return Vibration::fullID(); + } + + virtual const QString shortName() override { + return "Vibration"; + } + + static const QString fullID() { + return "Vibration"; + } +public slots: + void vibrate(int, int, int mills); + void cancelVibration(int, int); + void vibrateWithPattern(int, int, const QList &pattern, int); + +private: + QList> _effects; + QList> _timers; +}; + +#endif diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/wp/Vibration.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/src/wp/Vibration.cs Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,77 @@ +/* + Licensed 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. +*/ + +using System; +using System.Windows; +using System.Windows.Controls; +using Microsoft.Devices; +using System.Runtime.Serialization; +using System.Threading; +using System.Windows.Resources; +using Microsoft.Phone.Controls; +using System.Diagnostics; + + +namespace WPCordovaClassLib.Cordova.Commands +{ + public class Vibration : BaseCommand + { + private static readonly int DEFAULT_DURATION = 200; + + public void vibrate(string vibrateDuration) + { + int msecs = DEFAULT_DURATION; // set default + + try + { + string[] args = JSON.JsonHelper.Deserialize(vibrateDuration); + + msecs = int.Parse(args[0]); + if (msecs < 1) + { + msecs = 1; + } + } + catch (FormatException) + { + + } + + vibrateMs(msecs); + + // TODO: may need to add listener to trigger DispatchCommandResult when the vibration ends... + DispatchCommandResult(); + } + + private static void vibrateMs(int msecs) + { + VibrateController.Default.Start(TimeSpan.FromMilliseconds(msecs)); + } + + public void vibrateWithPattern(string options) + { + // falling back to vibrate + vibrateMs(DEFAULT_DURATION); + + // TODO: may need to add listener to trigger DispatchCommandResult when the vibration ends... + DispatchCommandResult(); + } + + public void cancelVibration(string options) + { + VibrateController.Default.Stop(); + DispatchCommandResult(); + } + } +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/tests/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,31 @@ + + + + + Cordova Vibration Plugin Tests + Apache 2.0 + + + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/tests/tests.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/tests/tests.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,313 @@ +/* + * + * 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. + * + */ + +exports.defineAutoTests = function () { + + describe('Vibration (navigator.notification.vibrate)', function () { + it("navigator.notification should exist", function () { + expect(navigator.notification).toBeDefined(); + }); + + it("should contain a vibrate function", function () { + expect(typeof navigator.notification.vibrate).toBeDefined(); + expect(typeof navigator.notification.vibrate).toBe("function"); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + var logMessage = function (message, color) { + var log = document.getElementById('info'); + var logLine = document.createElement('div'); + if (color) { + logLine.style.color = color; + } + logLine.innerHTML = message; + log.appendChild(logLine); + } + + var clearLog = function () { + var log = document.getElementById('info'); + log.innerHTML = ''; + } + + //------------------------------------------------------------------------- + // Vibrations + //------------------------------------------------------------------------- + + //old vibrate call + var vibrateOld = function(){ + clearLog(); + navigator.notification.vibrate(2500); + logMessage("navigator.notification.vibrate(2500)", "green"); + }; + + //old vibrate with pattern call + var vibrateWithPatternOld = function(){ + clearLog(); + navigator.notification.vibrateWithPattern([1000, 3000, 2000, 5000]); + logMessage("navigator.notification.vibrateWithPattern([1000, 3000, 2000, 5000])", "green"); + }; + + //old cancel vibrate call + var cancelOld = function(){ + clearLog(); + navigator.notification.cancelVibration(); + logMessage("navigator.notification.cancelVibration()", "green"); + }; + + //new standard vibrate call that aligns to w3c spec with param long + var vibrateWithInt = function() { + clearLog(); + navigator.vibrate(3000); + logMessage("navigator.vibrate(3000)", "green"); + }; + + //new standard vibrate call that aligns to w3c spec with param array + var vibrateWithArray = function() { + clearLog(); + navigator.vibrate([3000]); + logMessage("navigator.vibrate([3000])", "green"); + }; + + //vibrate with a pattern using w3c spec + var vibrateWithPattern = function() { + clearLog(); + navigator.vibrate([1000, 2000, 3000, 2000, 5000]); + logMessage("navigator.vibrate([1000, 2000, 3000, 2000, 5000])", "green"); + }; + + //cancel existing vibration using w3c spec navigator.vibrate(0) + var cancelWithZero = function() { + clearLog(); + navigator.vibrate(0); + logMessage("navigator.vibrate(0)", "green"); + }; + + //cancel existing vibration using w3c spec navigator.vibrate([]) + var cancelWithEmpty = function() { + clearLog(); + navigator.vibrate([]); + logMessage("navigator.vibrate([])", "green"); + }; + + //reference to the timeout variable + var timeout; + + //special long vibrate used to test cancel + var longVibrate = function() { + clearLog(); + navigator.vibrate(60000); + vibrateOn = true; + logMessage("navigator.vibrate(60000)", "green"); + timeout = setTimeout(resetVibrateOn, 60000); //if user doesn't cancel vibrate, reset vibrateOn var after 60 seconds + }; + + //special long vibrate with pattern used to test cancel + var longVibrateWithPattern = function() { + clearLog(); + navigator.vibrate([1000, 2000, 3000, 2000, 5000, 2000, 30000]); + vibrateOn = true; + logMessage("navigator.vibrate([1000, 2000, 3000, 2000, 5000, 2000, 30000])", "green"); + timeout = setTimeout(resetVibrateOn, 45000); //if user doesn't cancel vibrate, reset vibrateOn var after 45 seconds + }; + + //initiate two vibrations to test cancel + var multipleVibrations = function() { + clearLog(); + navigator.vibrate(20000); + navigator.vibrate(45000); + vibrateOn = true; + logMessage("navigator.vibrate(15000)\nnavigator.vibrate(45000)", "green"); + timeout = setTimeout(resetVibrateOn, 45000); //if user doesn't cancel vibrate, reset vibrateOn var after 45 seconds + } + + function resetVibrateOn() { + vibrateOn = false; + } + + //check whether there is an ongoing vibration + var vibrateOn = false; + + + + + var vibrate_tests = '

Vibrate Tests

' + + '

Starred tests only work for Android and Windows.

' + + '

iOS ignores the time given for a vibrate

' + + '
' + + 'Expected result: Vibrate once for 2.5 seconds.' + + '

' + + 'Expected result: Pause for 1s, vibrate for 3s, pause for 2s, vibrate for 5s.' + + '

' + + 'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Press once to initiate vibrate with pattern for 45s. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Vibrate once for 3 seconds.' + + '

' + + 'Expected result: Vibrate once for 3 seconds.' + + '

' + + 'Expected result: Vibrate for 1s, pause for 2s, vibrate for 3s, pause for 2s, vibrate for 5s.' + + '

' + + 'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Press once to initiate vibrate with pattern for 45s. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Press once to initiate vibrate with pattern for 45s. Press again to cancel vibrate immediately.' + + '

' + + 'Expected result: Press once to initiate two vibrations simultaneously (one for 20s the other for 45s so total of 45s). Press again to cancel both vibrations immediately.'; + + + contentEl.innerHTML = '
' + vibrate_tests; + + //standard vibrate with old call + createActionButton('Vibrate (Old)', function () { + vibrateOld(); + }, 'vibrate_old'); + + //vibrate with pattern with old call + createActionButton('* Vibrate with a pattern (Old)', function () { + vibrateWithPatternOld(); + }, 'vibrateWithPattern_old'); + + //cancel vibrate with old call + createActionButton('* Cancel vibration (Old)', function() { + + if (!vibrateOn) + { + longVibrate(); + } + else + { + cancelOld(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancelVibrate_old'); + + //cancel vibrate with pattern with old call + createActionButton('* Cancel vibration with pattern (Old)', function() { + + if (!vibrateOn) + { + longVibrateWithPattern(); + } + else + { + cancelOld(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancelVibrateWithPattern_old'); + + //standard vibrate with new call param int + createActionButton('Vibrate with int', function() { + vibrateWithInt(); + }, 'vibrate_int'); + + //standard vibrate with new call param array + createActionButton('Vibrate with array', function() { + vibrateWithArray(); + }, 'vibrate_array'); + + //vibrate with a pattern + createActionButton('* Vibrate with a pattern', function() { + vibrateWithPattern(); + }, 'vibrate_with_pattern'); + + //cancel any existing vibrations with param 0 + createActionButton('* Cancel vibration with 0', function() { + + if (!vibrateOn) + { + longVibrate(); + } + else + { + cancelWithZero(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancel_zero'); + + //cancel any existing vibrations with param [] + createActionButton('* Cancel vibration with []', function() { + + if (!vibrateOn) + { + longVibrate(); + } + else + { + cancelWithEmpty(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancel_array'); + + //cancel vibration with pattern with param 0 + createActionButton('* Cancel vibration with pattern with 0', function() { + + if (!vibrateOn) + { + longVibrateWithPattern(); + } + else + { + cancelWithZero(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancelWithPattern_zero'); + + //cancel vibration with pattern with param [] + createActionButton('* Cancel vibration with pattern with []', function() { + + if (!vibrateOn) + { + longVibrateWithPattern(); + } + else + { + cancelWithEmpty(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancelWithPattern_array'); + + //cancel multiple vibrations + createActionButton('* Cancel multiple vibrations', function() { + + if (!vibrateOn) + { + multipleVibrations(); + } + else + { + cancelWithZero(); + resetVibrateOn(); + clearTimeout(timeout); //clear the timeout since user has canceled the vibrate + } + }, 'cancelMultipleVibrations'); +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/www/blackberry10/vibrate.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/www/blackberry10/vibrate.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,26 @@ +/* + * + * 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. + * +*/ + +var vibrate = function(duration) { + navigator.vibrate(duration); +}; + +module.exports = vibrate; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/www/vibration.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/org.apache.cordova.vibration/www/vibration.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,119 @@ +/* + * + * 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. + * +*/ + +var exec = require('cordova/exec'); + +/** + * Provides access to the vibration mechanism on the device. + */ + +module.exports = { + + /** + * Vibrates the device for a given amount of time or for a given pattern or immediately cancels any ongoing vibrations (depending on the parameter). + * + * @param {Integer} param The number of milliseconds to vibrate (if 0, cancels vibration) + * + * + * @param {Array of Integer} param Pattern with which to vibrate the device. + * Pass in an array of integers that + * are the durations for which to + * turn on or off the vibrator in + * milliseconds. The FIRST value + * indicates the + * number of milliseconds for which + * to keep the vibrator ON before + * turning it off. The NEXT value indicates the + * number of milliseconds for which + * to keep the vibrator OFF before + * turning it on. Subsequent values + * alternate between durations in + * milliseconds to turn the vibrator + * off or to turn the vibrator on. + * (if empty, cancels vibration) + */ + vibrate: function(param) { + + /* Aligning with w3c spec */ + + //vibrate + if ((typeof param == 'number') && param != 0) + exec(null, null, "Vibration", "vibrate", [param]); + + //vibrate with array ( i.e. vibrate([3000]) ) + else if ((typeof param == 'object') && param.length == 1) + { + //cancel if vibrate([0]) + if (param[0] == 0) + exec(null, null, "Vibration", "cancelVibration", []); + + //else vibrate + else + exec(null, null, "Vibration", "vibrate", [param[0]]); + } + + //vibrate with a pattern + else if ((typeof param == 'object') && param.length > 1) + { + var repeat = -1; //no repeat + exec(null, null, "Vibration", "vibrateWithPattern", [param, repeat]); + } + + //cancel vibration (param = 0 or []) + else + exec(null, null, "Vibration", "cancelVibration", []); + }, + + /** + * Vibrates the device with a given pattern. + * + * @param {Array of Integer} pattern Pattern with which to vibrate the device. + * Pass in an array of integers that + * are the durations for which to + * turn on or off the vibrator in + * milliseconds. The first value + * indicates the number of milliseconds + * to wait before turning the vibrator + * on. The next value indicates the + * number of milliseconds for which + * to keep the vibrator on before + * turning it off. Subsequent values + * alternate between durations in + * milliseconds to turn the vibrator + * off or to turn the vibrator on. + * + * @param {Integer} repeat Optional index into the pattern array at which + * to start repeating (will repeat until canceled), + * or -1 for no repetition (default). + */ + vibrateWithPattern: function(pattern, repeat) { + repeat = (typeof repeat !== "undefined") ? repeat : -1; + pattern.unshift(0); //add a 0 at beginning for backwards compatibility from w3c spec + exec(null, null, "Vibration", "vibrateWithPattern", [pattern, repeat]); + }, + + /** + * Immediately cancels any currently running vibration. + */ + cancelVibration: function() { + exec(null, null, "Vibration", "cancelVibration", []); + } +}; diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/wp8.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/plugins/wp8.json Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,16 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": {} + }, + "installed_plugins": { + "org.apache.cordova.device": {}, + "org.apache.cordova.splashscreen": {}, + "org.apache.cordova.vibration": {}, + "org.apache.cordova.dialogs": {} + }, + "dependent_plugins": {} +} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/screenshot.png Binary file Touchgui/screenshot.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/screenshot0a.png Binary file Touchgui/screenshot0a.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/screenshot1a.png Binary file Touchgui/screenshot1a.png has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/css/main.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/www/css/main.css Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,42 @@ +.center{ + text-align: center; +} + +h1{ + font-style: italic; +} + +#notifier_circle{ + display: inline-block; + margin-top: 18px; + -webkit-animation-name: spin; + -webkit-animation-duration: 3s; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + -moz-animation-name: spin; + -moz-animation-duration: 3s; + -moz-animation-iteration-count: infinite; + -moz-animation-timing-function: linear; + -ms-animation-name: spin; + -ms-animation-duration: 3s; + -ms-animation-iteration-count: infinite; + -ms-animation-timing-function: linear; + + border-radius: 50%; + } + +.green{ + background-image: -moz-radial-gradient(45px 45px 45deg, circle cover, #80EE9F 0%, #1BCA37 100%, #AFEAAA 95%); + background-image: -webkit-radial-gradient(45px 45px, circle cover, #80EE9F, #1BCA37); + background-image: radial-gradient(45px 45px 45deg, circle cover, #80EE9F 0%, #1BCA37 100%, #AFEAAA 95%); +} + +.gray{ + background-image: -moz-radial-gradient(45px 45px 45deg, circle cover, rgba(182, 180, 180, 0.59) 0%, rgba(178, 190, 180, 0) 100%, black 95%); + background-image: -webkit-radial-gradient(45px 45px, circle cover, rgba(182, 180, 180, 0.59), rgba(178, 190, 180, 0)); + background-image: radial-gradient(45px 45px 45deg, circle cover, rgba(182, 180, 180, 0.59) 0%, rgba(178, 190, 180, 0) 100%, black 95%); +} + +.redtext{ + color:red; +} \ No newline at end of file diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/www/index.html Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,65 @@ + + + + Touch Buzzer Companion App + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+

Are you Expecting Anyone?

+
+ +
+
+
+ Log:
+
+
+
+ +
+

Please provide an IP address & port to your TouchNotifier IoT project (Touch Sensor & Buzzer) on your development platform.

+ Note: This is needed for establishing a connection betweeen your Companion App and Node.js/IoT application. +

+ + + Submit +

+
+
+ + + diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/js/.DS_Store Binary file Touchgui/www/js/.DS_Store has changed diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/js/main.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/www/js/main.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,77 @@ +/*jslint unparam: true */ + +/* jshint strict: true, -W097, unused:false */ +/*global window, document, d3, $, io, navigator, setTimeout */ + +//Set the size of the Notifier Circle +$("#notifier_circle").width(0.8 * window.innerWidth); +$("#notifier_circle").height(0.8 * window.innerWidth); + + +/* +Function: validateIP() +Parameter: none +Description: Attempt to connect to server/Intel IoT platform +*/ +function validateIP() { + 'use strict'; + var socket, + //Get values from text fields + ip_addr = $("#ip_address").val(), + port = $("#port").val(), + script = document.createElement("script"); + + //create script tag for socket.io.js file located on your IoT platform (development board) + script.setAttribute("src", "http://" + ip_addr + ":" + port + "/socket.io/socket.io.js"); + document.head.appendChild(script); + + //Wait 1 second before connecting + setTimeout(function () { + try { + //Connect to Server + socket = io.connect("http://" + ip_addr + ":" + port); + + //Attach a 'connected' event handler to the socket + socket.on("connected", function (message) { + navigator.notification.alert( + 'Welcome', // message + "", // callback + 'Hi There!', // title + 'Ok' // buttonName + ); + }); + + //Set all Back button to not show + $.ui.showBackButton = false; + //Load page with transition + $.ui.loadContent("#main", false, false, "fade"); + + socket.on("message", function (message) { + //alert("Is anyone there? "+message); + if (message === "present") { + $("#notifier_circle").attr("class", "green"); + //Update log + $("#feedback_log").append(Date().substr(0, 21) + " Someone is Present!
"); + //Prompt user with Cordova notification alert + navigator.notification.alert( + 'Someone is Present!', // message + "", // callback + 'Check Your Door', // title + 'Ok' // buttonName + ); + //Wait 2 seconds then turn back to gray + setTimeout(function () { + $("#notifier_circle").attr("class", "gray"); + }, 3000); + } + }); + } catch (e) { + navigator.notification.alert( + "Server Not Available!", // message + "", // callback + 'Connection Error!', // title + 'Ok' // buttonName + ); + } + }, 1000); +} diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/lib/appframework/af.ui.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/www/lib/appframework/af.ui.css Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,3507 @@ +/*! intel-appframework - v2.1.0 - 2014-09-22 */ + +/********************************************************** + GENERAL UI ELEMENTS +**********************************************************/ + +* { + -webkit-user-select:none; /* Prevent copy paste for all elements except text fields */ + -webkit-tap-highlight-color:rgba(0, 0, 0, 0); /* set highlight color for user interaction */ + -moz-tap-highlight-color:rgba(0, 0, 0, 0); /* set highlight color for user interaction */ + -ms-touch-action:none; + -moz-user-select:-moz-none; + -webkit-touch-callout: none; /* prevent the popup menu on any links*/ + margin:0; + padding:0; + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; +} + +body { + overflow-x:hidden; + -webkit-text-size-adjust:none; + font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; + color:#000; + font-size:14px; + display:-webkit-box; + background: #CBD2D8; + /* We want to layout our first container vertically */ + -webkit-box-orient: vertical; + /* we want our child elements to stretch to fit the container */ + -webkit-box-align:stretch; +} /* General styles that apply to elements not contained within other classes and styles */ + + +#afui input,textarea { -webkit-user-select:text; -moz-user-select:-moz-text;-moz-user-select:text;} /* allow users to select text that appears in input fields */ + +#afui img { border:none; } /* Remove default borders for images */ + + +#afui p { + display:block; + margin:6px 0; + + font-size:14px; + line-height:20px; + color:inherit +} + + +#afui #afui_modal { + background: inherit; + color:inherit; + -webkit-backface-visibility: hidden; + z-index:9999 !important; + width:100%; + height:100%; + display:none; + position:absolute; top:0; + overflow:hidden; + display: -webkit-box; + display: -moz-box; + display: box; + display: -ms-flexbox; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-box-orient: vertical; + box-orient: vertical; + display: -webkit-flex; + display: -moz-flex; + display: -ms-flex; + display: flex; + -webkit-flex-direction: column; + -moz-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + + +#afui #modalContainer > * { + -webkit-backface-visibility: hidden; + -webkit-perspective: 1000; + background:inherit; + color:inherit; +} + + + +#afui .afScrollPanel { width:100%; min-height:100%; } + +#afui { + position:absolute; + width:100%; + top:0; + bottom:0; + overflow:hidden; +} + +#afui,.flexContainer { + display: -webkit-box; + display: -moz-box; + display: box; + display: -ms-flexbox; + + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-box-orient: vertical; + box-orient: vertical; + + /* current syntax */ + display: -webkit-flex; + display: -moz-flex; + display: -ms-flex; + display: flex; + + -webkit-flex-direction: column; + -moz-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +#afui > #splashscreen { + position:absolute; + top:0;bottom:0; + width:100%; + left:0; + min-height:100%; + background:rgba(29,29,28,1) !important; + color:white !important; + font-size:30px; + text-align:center; + z-index:9999; + display:block; + margin-left: auto !important; margin-right: auto !important; + padding-top:80px !important; +} + + +/********************************************************** + header +**********************************************************/ +#afui .header { + position:relative; + overflow: hidden; + display:block; + z-index:250; + -webkit-box-sizing:border-box; box-sizing:border-box; + height:44px; + left:0; right:0; + +} /* This is masthead bar that appears at the top of the UI */ + + + + +#afui .header h1 { + + position: absolute; + width: 45%; + z-index: 1; + height: 44px; + font-size: 18px; + font-weight: bold; + left: 27.5%; + color: inherit; + padding: 10px 0; + text-shadow: rgba(0,0,0,0.8) 0 -1px 0; + text-align: center; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} /* This is text that appears in the header at the top of the screen */ + + +/********************************************************** + CONTENT AREA +**********************************************************/ + +#afui #content, #afui_modal #modalContainer { + z-index:180; + + position:relative; + /* previous syntax */ + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + + /* current syntax */ + -webkit-flex: 1; + -moz-flex: 1; + -ms-flex: 1; + flex: 1; + overflow:hidden; + + background:inherit; + color:inherit; +} /* Accounts for positioning of the content area, which is everything below the header and above the navbar. */ + + +#afui .panel { + z-index:180; + width:100%; + height:100%; + display:none; + position:absolute; top:0; left:0; + overflow-y:auto; + overflow-x:hidden; + -webkit-overflow-scrolling:touch; + -webkit-backface-visibility: hidden; + padding:10px; + padding-top:0px; +} /* This class is applied to the divs that contain the various "views" or pages of the app. */ + + +/********************************************************** + scroller CSS +**********************************************************/ +#afui .y-scroll, #afui .panel.y-scroll { + overflow-x:hidden; + overflow-y:auto; +} +#afui .x-scroll, #afui .panel.x-scroll { + overflow-x:auto; + overflow-y:hidden; +} +#afui .no-scroll, #afui .panel.no-scroll { + overflow:hidden; +} + + +/********************************************************** + Navbar +**********************************************************/ +/* Nav bar appears locked to the bottom of the screen. It is the primary navigation. can contain text or graphical navigation */ + +#afui .footer { + z-index:180; + height:49px; + display:block; + left:0; + right:0; + position:relative; + padding:0 3px; +} + + +#afui footer>a:not(.button) { + -webkit-box-sizing:border-box; + box-sizing: border-box; + top: 3px; + height: 43px; + overflow: hidden; + font-size:12px; + font-weight:normal; + text-decoration: none; + color: #fff; + text-align: center; + display: inline-block; + width: 25%; + -webkit-backface-visibility: hidden; + -webkit-perspective: 1000; + line-height: 67px; + position: relative; + margin: 0; +} + + +#afui footer>a:not(.button) .af-badge { + right:auto; + margin-left:-16px; +} + + +#afui footer>a.icon:not(.button):before { + position:absolute; + top:2px; + left:0; + font-size: 25px; + margin:auto; + width: 100%; +} + + +#afui footer>a.pressed:not(.button) { + +} + + +#afui footer>a.icon.pressed:not(.button):before { + +} + +/* Custom footers - always hidden */ +#afui footer, #afui header, #afui nav, #afui aside { display:none; } + +/* Show the active header/footer/navs */ +#afui .footer footer, #afui #menu nav, #afui .header header, #afui #aside_menu aside {display:block; height:100%;} + +#afui > #menu.tabletMenu { + z-index:1; + width:200px; + bottom:0; + display:none; + position:absolute; top:0; left:0; + border-right: 1px solid rgba(128,128,128,0.5); + +} + +#afui > #aside_menu { + z-index:1; + width:200px; + bottom:0; + height:100%; + display:none; + position:absolute; top:0; right:0; + border-left: 1px solid rgba(128,128,128,0.5); +} + + +#afui #menu_scroller, #afui #aside_menu_scroller { + padding-bottom:10px; + overflow-y:auto; + overflow-x:hidden; + -webkit-backface-visibility: hidden; + -webkit-overflow-scrolling:touch; +} + + +#afui #menu_scroller > *, #afui #aside_menu_scroller > * { + -webkit-backface-visibility: hidden; + -webkit-perspective: 1000; +} + + +#afui #menu .list li, +#afui #menu .list .divider, +#afui #menu .list li:first-child, +#afui #menu .list li:last-child, + +#afui #aside_menu .list li, +#afui #aside_menu .list .divider, +#afui #aside_menu .list li:first-child, +#afui #aside_menu .list li:last-child + { + + font-weight:bold; + font-size:1em; + line-height:1em; + border-color:#101012; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); + +} + +#afui #menu .list > li > a, +#afui #aside_menu .list > li > a +{ + color:#ccc; + margin-left:6px; + font-weight: normal; +} + + +#afui #menu .list, +#afui #menu .list .divider, +#afui #aside_menu .list, +#afui #aside_menu .list .divider +{ background:inherit; } + + +#afui #menu .list .divider, #afui #aside_menu .list .divider { + background:#333; + color:#fff; + font-weight:bold; + font-size:1em; + line-height:1em; + padding:6px; + top:0px; + border:none; + -webkit-box-shadow:none; box-shadow: none; +} + + +#afui #menu .list > li > a:after, #afui #aside_menu .list > li > a:after { margin-top: -8px; } + +/* End side menu css */ + + + +#afui .splashscreen { + background:rgba(29,29,28,1) !important; + padding-left:40px; + padding-top:30px !important; + min-height:100%; +} + + +#afui h2 { + display:block; + height:34px; + font-weight: bold; + font-size:18px; + color:#000; + padding:6px 0; + margin-bottom:8px; +} /* Header class used for non-navigable header bars (h1 is reserved for the header) */ + + +#afui .collapsed:after { + float:right; + content:''; + border-left:5px solid transparent; + border-right:5px solid transparent; + border-top:6px solid #000; + display:block; + position:absolute; + top:14px;right:14px; +} + +#afui .collapsed:before { + float:right; + content:''; + color:transparent; + background:transparent; + width:14px; height:14px; + display:block; + border:2px solid #000; + border-radius:3px; + position:absolute; + top:8px;right:10px; +} + +#afui .expanded:after { + float:right;content:''; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 6px solid #000; + display:block; + position:absolute; + top:13px;right:14px; +} + +#afui .expanded:before { + float:right; + content:''; + color:transparent; + background:transparent; + width:14px; height:14px; + display:block; + border:2px solid #000; + border-radius:3px; + position:absolute; + top:8px;right:10px; +} + + +/********************************************************** + UI +**********************************************************/ + +.ui-icon { + background: #666; + background: rgba(0,0,0,.4); + background-repeat: no-repeat; + border-radius: 9px; +} + + +.ui-loader { display: none; position: absolute; opacity: .85; z-index: 100; left: 50%; width: 200px; margin-left: -100px; margin-top: -35px; padding: 10px 30px; background: #666;background:rgba(0,0,0,.4);border-radius:9px;color:white;} +.ui-loader.heavy {opacity:1;} +.ui-loader h1 { font-size: 15px; text-align: center; } +.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; } + + +.spin { + -webkit-transform: rotate(360deg); + -webkit-animation-name: spin; + -webkit-animation-duration: 1s; + -webkit-animation-iteration-count: infinite; +} +@-webkit-keyframes spin { + from {-webkit-transform: rotate(0deg);} + to {-webkit-transform: rotate(360deg);} +} + + +.ui-icon-loading { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjBAMAAADs965qAAAAA3NCSVQICAjb4U/gAAAAMFBMVEX////x8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHvvEhiAAAAEHRSTlMAESIzRFVmd4iZqrvM3e7/dpUBFQAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAEaSURBVCiRY2AgATCapaUqoIiIzN5z5syZJiQRltW7gUJ3705C6OraDRG6GwATkli1evdusNBTuKJVq3c4MjBX3733DqqMfdWqFWDbau+9ewIRspy5KgHMYL737g1EX+fMaVAjbN+9KwDLzZxZAHPMu3cXwEbNnAl397p3YDslOmD6GBjs/v8AURodzXAh3v+/QZRHRyNciPP/f4hQA1yIHVMICtzLC9CFzMuL0IXEy0vQhdjK0+BsRqgv0tIMYEKCggJgmbS0QJgiQUEIwy0tVQCmCCokmhYaCFMElWMKDQ01BIkoKcKEGFRDQ1yMlISUgEIwe5iAQi7GxkpKSjBFwMh2cXEGCSkiOVcFLIQswsAgZGxshCpCBgAA0FNYp5zwDegAAAAASUVORK5CYII=); + width: 40px; + height: 40px; + border-radius: 20px; + background-size: 35px 35px; +} + + +#afui .ui-corner-all { border-radius:.6em; } + + +#afui_mask { position:absolute;top:45%;z-index:999999; } + +.afui_panel_mask { position:absolute;top:0;bottom:0;left:0;right:0;z-index:2000;background-color:rgba(0,0,0,0.1);display:none} + +#afui .hasMenu{ + left:0; +} + + +#afui .menuButton { + position: relative; + top: 5px; + right: -8px; + height: 36px; + width: 36px; + z-index:2; + float:right; +} + + +#afui .menuButton:after { + border-bottom: 9px double white; + border-top: 3px solid white; + top: 9px; + left: 3px; + content: ""; + height: 3px; + position: absolute; + width: 15px; +} + +#afui .hasMenu.on { + -webkit-transform:translate3d(200px,0,0); + transform:translate(200px,0); +} + + + + + +#afui .modalbutton { + position:absolute; + top:0; + right:5px; + height:32px; + width:58px; + line-height:32px; + z-index:9999; +} + + +#afui .closebutton { + position:absolute; + top:6px; right:6px; + display:block; + height:24px ; + width:24px ; + border-radius:12px; + border:1px solid #666; + background:#fff; + color:#333; + font-weight: bold; + font-size:21px; + line-height:18px; + text-align:center; + text-decoration:none; +} + +#afui .closebutton:before { content:'x'; } + +#afui .closebutton.selected,.closebutton.modalButton.selected { + color:#fff; + background:#333; +} + +#afui .panel > .list, +#afui .panel > .afScrollPanel > .list { + margin:0px -10px; +} + +#afui .panel > .list.inset, +#afui .panel > .afScrollPanel > .list.inset { + margin:0px; +} + + +/* Chevrons */ +@font-face { + font-family: 'chevron'; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAQAAA0AAAAABZgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABoAAAAcZ/T02kdERUYAAAFMAAAAHwAAACAAMgAGT1MvMgAAAWwAAABHAAAAVj7i2r5jbWFwAAABtAAAAEMAAAFS8BX0J2dhc3AAAAH4AAAACAAAAAj//wADZ2x5ZgAAAgAAAABsAAAAbMHrMoZoZWFkAAACbAAAADAAAAA2/JaSB2hoZWEAAAKcAAAAHgAAACQDav/GaG10eAAAArwAAAATAAAAFAN1AB1sb2NhAAAC0AAAAAwAAAAMAA4ANm1heHAAAALcAAAAHQAAACAASAAbbmFtZQAAAvwAAADdAAABhigr581wb3N0AAAD3AAAACIAAAA8nFVDO3icY2BgYGQAgjO2i86D6LO3V7LCaABOtwcoAAB4nGNgZGBg4ANiCQYQYGJgZGBmYAGSLGAeAwAEkAA5AHicY2BkVGCcwMDKwMGozGjJwMBgB6WvM4gxFDMwMDGwMjPAgQCCyRCQ5prC4PCB4UMIY8P/AwwajA0MDg0MDIwgOQBg6QqyAHicY2BgYGaAYBkGRgYQ8AHyGMF8FgYDIM0BhEwgiQ8MH0L+/0dmCTDzb4DqAgNGNgY4lxGkh4kBFTAyDHsAAFhbChsAAAAAAf//AAIAAQAA/8ABwAGAAAIAABEBIQHA/kABgP5AAAAAAAEAHf/tARMBcwAXAAAlFA8BBiIvASY1ND8BJyY1ND8BNjIfARYBEwmkCRoJFAkJenoJCRQIHAikCbANCqMJCRMKDQ0JenkKDQ0JEwoKowl4nGNgZGBgAOLcX7xy8fw2Xxm4GQ8ARRjO3l7JiqD/H2A8wNgA5HIwMIFEAUPwC7d4nGNgZGBgbPh/gEGD8QADwz8HIAkUQQGsAIQZBTAAAHicYzzAAAFTIRSjAoMsABVQAZUAAAAAAAAAAAAADgA2eJxjYGRgYGBlkGAA0QwMTEDMCGY7gPkMAAUvAGQAAAB4nHWOTWoCQRBG3+hoCIbgKmTZkE02M3RPwIUHmAO4cC/SjII40P7gSbLKEbL0GB4gR8gx/JzUJgsbin68rqqvgSc+ybidjAfGxj3xu3GfN07Gufy38YARF+Oh/K86s/xR5rmbunFP/Grcp8Yb5/JfxgNeOBsP5X9YsiJyJNGyheUqHlMrmMk2HNiw0Buz2Bw2C0Hd9e27O6kj4qgoleaYqv7v+3NBrwUTVSUKfGhNu93XbWqiq0rvps5yRcEXk6LyQU33/jaXTexYW0bo8pnHtFtrRyj93dkrAWI51wAAAHicY2BiwA9YgZiRgYmRiZGZvTQv083AwABCm5oAACfXBG0AAA==) format('woff'), + url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTWf09NoAAAV8AAAAHEdERUYAMgAGAAAFXAAAACBPUy8yPuLavgAAAVgAAABWY21hcPAV9CcAAAHEAAABUmdhc3D//wADAAAFVAAAAAhnbHlmwesyhgAAAyQAAABsaGVhZPyWkgcAAADcAAAANmhoZWEDav/GAAABFAAAACRobXR4A3UAHQAAAbAAAAAUbG9jYQAOADYAAAMYAAAADG1heHAASAAbAAABOAAAACBuYW1lKCvnzQAAA5AAAAGGcG9zdJxVQzsAAAUYAAAAPAABAAAAAQAAbfoNHl8PPPUACwHAAAAAAM3bqQUAAAAAzdupBQAA/8ABwAGAAAAACAACAAAAAAAAAAEAAAGA/8AAKAHAAAD+QAHAAAEAAAAAAAAAAAAAAAAAAAAFAAEAAAAFABgAAQAAAAAAAgAAAAEAAQAAAEAAAAAAAAAAAQEgAZAABQAIASMBOQAAAD4BIwE5AAAA1wAWAHMAAAIABQMAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUGZFZABA8ADwVAGA/8AAKAGAAECAAAABAAAAAAAAAcAAAAAAAAAAlQAAAAAAAAEgAB0AAAADAAAAAwAAABwAAQAAAAAATAADAAEAAAAcAAQAMAAAAAgACAACAAAAAPAA8FT//wAAAADwAPBU//8AABADD7AAAQAAAAAAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgA2AAEAAP/AAcABgAACAAARASEBwP5AAYD+QAAAAAABAB3/7QETAXMAFwAAJRQPAQYiLwEmNTQ/AScmNTQ/ATYyHwEWARMJpAkaCRQJCXp6CQkUCBwIpAmwDQqjCQkTCg0NCXp5Cg0NCRMKCqMJAAAADACWAAEAAAAAAAEABwAQAAEAAAAAAAIABwAoAAEAAAAAAAMAIwB4AAEAAAAAAAQABwCsAAEAAAAAAAUACwDMAAEAAAAAAAYABwDoAAMAAQQJAAEADgAAAAMAAQQJAAIADgAYAAMAAQQJAAMARgAwAAMAAQQJAAQADgCcAAMAAQQJAAUAFgC0AAMAAQQJAAYADgDYAGMAaABlAHYAcgBvAG4AAGNoZXZyb24AAFIAZQBnAHUAbABhAHIAAFJlZ3VsYXIAAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAYwBoAGUAdgByAG8AbgAgADoAIAAxADAALQA2AC0AMgAwADEAMwAARm9udEZvcmdlIDIuMCA6IGNoZXZyb24gOiAxMC02LTIwMTMAAGMAaABlAHYAcgBvAG4AAGNoZXZyb24AAFYAZQByAHMAaQBvAG4AIAAxAC4AMAAAVmVyc2lvbiAxLjAAAGMAaABlAHYAcgBvAG4AAGNoZXZyb24AAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIBAwd1bmlGMDAwB3VuaUYwNTQAAAAB//8AAgABAAAADgAAABgAAAAAAAIAAQADAAQAAQAEAAAAAgAAAAAAAQAAAADMPaLPAAAAAM3bqQUAAAAAzdupBQ==) format('truetype'); + font-weight: normal; + font-style: normal; +} + +#afui .chevron { + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; +} +#afui .chevron:before { + content: "\f054"; +} + +#afui .chevron.left { + -webkit-transform:rotate(180deg); + transform:rotate(180deg); +} + + +@media handheld, only screen and (min-width: 768px) { + #afui .footer.hasMenu.splitview, #afui .header.hasMenu.splitview, #afui #content.hasMenu.splitview { + position:relative; + right:0px; + margin-left:256px; + -webkit-transition: transform 0ms; + -webkit-transform:none; + transition:transform 0ms; + transform:none ; + width: -webkit-calc(100% - 256px); + width: calc(100% - 256px); + } + + #afui > #aside_menu.splitview { + width:256px; + } + + + #afui > #menu.tabletMenu.splitview { + z-index:1; + width:256px; + bottom:0; + height:100% ; + display:block; + position:absolute ; top:0; + left:0px; + -webkit-transform:none; + -webkit-transition:none; + transform:none; + transition:none; + } + + #afui .splitview .menuButton { display:none; } +} + +@media print { + body { + overflow:visible; + } + #afui #content{ + overflow: visible; + left:0; + } + #afui { + overflow:visible; + } + #afui .panel { + overflow-x:visible !important; + overflow-y:visible !important; + overflow:visible !important; + } +} + +/* blue #0190d6 + + */ + +@-ms-viewport { + width: device-width; +} + +#afui { + background:white; + color:#53575E; +} + +#afui .header{ + background:#0088D1; + border:none; + border-bottom:1px solid #0088D1; + color:white; +} + +#afui .header h1 { + text-shadow:none; + width:45%; +} + +#afui .backButton { + background:rgba(249,249,249,1); + color:#fff; + display: block; + position: absolute; + line-height:44px; + left: 25px; + text-overflow: ellipsis; + font-size: 14px; + padding:0; + text-shadow: none; + background-color: transparent; + border:none; + border-color:transparent; + height: 44px; + top:0; + border-radius:0; + box-shadow:none; + margin: 0; + padding-left: 0; + text-align: center; + width:50px; + padding:0 !important; + margin:0 !important; +} + +#afui .backButton::before { + z-index: -1; + font-size:22px; + position: absolute; + top: 10px; + left: -20px; + text-align: center; + border-radius:0; + border: none; + border-color:transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + -webkit-transform:rotate(180deg); + transform:rotate(180deg); + background-color: transparent; +} + +#afui header .backButton { + position:absolute; +} + +#afui .footer { + background:#0088D1; + border:none; + border-top:1px solid #0088D1; + box-shadow:none; +} + +#afui footer>a:not(.button) { + +} + +#afui footer>a.pressed:not(.button) { + border-radius:0; + background:#00AEEF; +} + +#afui footer>a.icon.pressed:not(.button):before { + color:inherit; +} + +#afui .af-badge { + border:none; +} + +#afui .list { + background:inherit; + color:inherit; + border-color:#303030; + font-weight:normal; +} + +#afui .af-badge { + box-shadow:none; +} + +#afui .list .divider { color:black; } + +#afui .panel, #afui #modalContainer, #afui #modal { + color:inherit; + background:inherit; +} + +#afui .panel h2 { color:#0088D1;} + +#afui .collapsed:after {border-top: 6px solid;} +#afui .collapsed:before {border:2px solid;} +#afui .expanded:after {border-bottom: 6px solid;} +#afui .expanded:before {border:2px solid;} + +#afui .collapsed:before,#afui .expanded:before { + border-color: inherit; +} + +#afui .collapsed:after, #afui .expanded:after{ + border-top-color:inherit; + border-top-color:inherit; +} + +#afui select, #afui textarea, #afui input[type="text"], +#afui input[type=search], #afui input[type="password"], +#afui input[type="datetime"], #afui input[type="datetime-local"], +#afui input[type="date"], #afui input[type="month"], +#afui input[type="time"], #afui input[type="week"], +#afui input[type="number"], #afui input[type="email"], +#afui input[type="url"], #afui input[type="tel"], +#afui input[type="color"], #afui .input-group { + background:inherit; + color:inherit; +} + +#afui input.toggle+label:after { color:inherit; } + +#afui input.toggle+label { border-radius:0; } + +#afui input.toggle+label > span { + border-radius:0; + top:0; + width:27px; + height:23px; +} + +#afui label { color:inherit; } + +#afui input[type="radio"]:checked+label:before,#afui input[type="checkbox"]:checked+label:before { + background: #33B5E5; +} + +#afui > #aside_menu, +#afui > #menu.tabletMenu { + color:white; + background:#00AEEF; + border-right:1px solid #006BA4; +} + +#afui #aside_menu .list li,#afui #aside_menu .list .divider,#afui #aside_menu .list li:last-child, +#afui #menu .list li,#afui #menu .list .divider,#afui #menu .list li:last-child { + border-color: #4CC6F4; +} + +#afui #aside_menu .list .divider, +#afui #menu .list .divider { + background:#0088D1; + color:inherit; + font-size: 1em; +} + +#afui #aside_menu .list > li > a, +#afui #menu .list > li > a { + background:inherit; + color:inherit; + font-size: 1em; +} + +#afui #aside_menu .list, +#afui #menu .list { + font-weight: normal; +} + +#afui .button { + border-radius:0; + text-shadow:none; +} + +#afui .list > li > a:after{ + color:#0088D1; +} + +#afui .button.pressed { + +} + +#afui .button.previous { + border:none; +} + +#afui .button.next { + border:none; +} + +#afui .button.previous::after { + color:black; + z-index: -1; + font-size:22px; + position: absolute; + top: 2px; + left: -25px; + text-align: center; + border-radius:0; + border: none; + border-color:transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + -webkit-transform:rotate(180deg); + transform:rotate(180deg); + background-color: transparent; +} + +#afui .button.next::after { + color:black; + z-index: -1; + font-size:22px; + position: absolute; + top: 6px; + right: -25px; + text-align: center; + border-radius:0; + border: none; + border-color:transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + background-color: transparent; +} + +#afui .afPopup { + border: solid 1px #33B5E5; + -webkit-border-radius: 5px; + border-radius: 5px; + background:inherit; + color:inherit; +} + +#afui .afPopup>FOOTER>A{ + width: 120px; +} + +#afui #af_actionsheet { + background:#0190d6; + color:inherit; +} + +#afui #af_actionsheet a{ + border-radius:0; + -webkit-border-radius:0; + color:black; + background:white; + border:none; + text-shadow:none; +} + +#afui .list { + margin: 0px; + padding: 0px; + margin-bottom: 10px; + list-style: none; + background-color: #fff; + box-sizing: border-box; + -webkit-box-sizing: border-box; + +} +#afui .list li { + display: block; + list-style: none; + position: relative; + padding: 20px 20px 20px 10px; + border-bottom: 1px solid #ccc; +} +#afui .list li:first-child { + border-top: 1px solid #ccc; +} +#afui .list > li > a { + display: block; + position: relative; + display: block; + color: inherit; + margin: -20px -20px -20px -10px; + text-decoration: none; + padding: 20px 20px 20px 10px; +} +#afui .list a .af-badge { + position: absolute; + right: 30px; + top: 48%; + margin-top: -10px; +} +#afui .list > li > a:after { + position: absolute; + right: 8px; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + top: 50%; + margin-top: -0.5em; + color:inherit; +} +#afui .list .divider { + position: relative; + top: -1px; + padding-top: 6px; + padding-bottom: 6px; + font-size: 12px; + font-weight: bold; + line-height: 18px; + background-color: #dfe0e2; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4); + padding-right: 60px; +} +#afui .list.inset { + border: 1px solid #ccc; + border-radius: 6px; + margin: 10px; +} +#afui .list.inset li:first-child { + border-top: none; +} +#afui .list.inset li:last-child { + border-bottom: none; +} +#afui select, +#afui textarea, +#afui input[type="text"], +#afui input[type=search], +#afui input[type="password"], +#afui input[type="datetime"], +#afui input[type="datetime-local"], +#afui input[type="date"], +#afui input[type="month"], +#afui input[type="time"], +#afui input[type="week"], +#afui input[type="number"], +#afui input[type="email"], +#afui input[type="url"], +#afui input[type="tel"], +#afui input[type="color"], +#afui .input-group { + width: 100%; + height: 40px; + padding: 10px; + margin-bottom: 10px; + background: #fff; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 14px; + font-weight: normal; + -webkit-appearance: none; + box-sizing: border-box; +} +#afui form { + position: relative; +} +#afui input[type="radio"], +#afui input[type="checkbox"] { + display: none; +} +#afui input[type="radio"] + label, +#afui input[type="checkbox"] + label { + display: inline-block; + width: 60%; + float: right; + position: relative; + text-align: left; + padding: 10px 0 0 0; +} +#afui input[type="radio"]:not(.toggle) + label:before { + background-color: #fafafa; + border: 1px solid #cacece; + border-radius: 50px; + display: block; + position: absolute; + width: 1.3em; + height: 1.3em; + content: ''; + margin-right: 5px; + top: 8px; + margin-left: -25px; +} +#afui input[type="radio"]:checked + label:before { + background-color: #000000; +} +#afui input[type="checkbox"] + label:before { + background-color: #fafafa; + border: 1px solid #cacece; + border-radius: 3px; + display: block; + position: absolute; + top: 8px; + left: -25px; + width: 1.3em; + height: 1.3em; + content: " "; +} +#afui input[type="checkbox"]:checked + label:before { + content: '\00a0\2714'; + padding: 0px; + display: inline-block; +} +#afui input[type="radio"]:after, +#afui input[type="checkbox"]:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +#afui input[type="search"] { + border-radius: 20px; +} +#afui label { + float: left; + width: 33%; + font-weight: normal; + font-size: 14px; + color: inherit; + text-align: right; + padding: 11px 6px; +} +#afui label + select, +#afui label + input[type="radio"], +#afui label + input[type="checkbox"] label + textarea, +#afui label + input[type="text"], +#afui label + input[type=search], +#afui label + input[type="password"], +#afui label + input[type="datetime"], +#afui label + input[type="datetime-local"], +#afui label + input[type="date"], +#afui label + input[type="month"], +#afui label + input[type="time"], +#afui label + input[type="week"], +#afui label + input[type="number"], +#afui label + input[type="email"], +#afui label + input[type="url"], +#afui label + input[type="tel"], +#afui label + input[type="color"], +#afui label + textarea { + width: 66%; +} +#afui textarea { + height: auto; +} +#afui .input-group { + width: auto; + height: auto; + padding: 12px; + overflow: hidden; +} +#afui .input-group input:not([type='button']):not([type='submit']), +#afui .input-group textarea, +#afui .input-group select { + margin-bottom: 0; + background-color: transparent; + border: 0; + border-bottom: 1px solid #ccc; + border-radius: 0; + box-shadow: none; +} +#afui .input-group input:not([type="submit"]):not([type="button"]):last-child, +#afui .input-group textarea:last-child, +#afui .input-group select:last-child { + border-bottom: none; +} +#afui .input-group input[type=button], +#afui .input-group input[type=submit] { + margin: 5px; +} +#afui input.toggle + label:before, +#afui input.toggle:checked + label:before { + content: attr(data-on); + position: absolute; + color: #fff; + left: 5px; + width: 42px; + text-align: left; + z-index: 3; + top: 3px; + overflow: hidden; + background-color: transparent; + border: none; + border-radius: 0px; + text-transform: uppercase; + display: none; +} +#afui input.toggle:checked + label:before { + display: block; +} +#afui input.toggle + label:after { + content: attr(data-off); + position: absolute; + color: #505050; + width: 42px; + text-align: left; + z-index: 1; + top: 2px; + left: 30px; + overflow: hidden; + background-color: transparent; + border: none; + border-radius: 0px; + text-transform: uppercase; +} +#afui input.toggle:checked + label:after { + display: none; +} +#afui input[type="radio"].toggle:checked + label:before { + line-height: 1.2em; +} +#afui input.toggle + label { + position: relative; + margin: 5px; + border-radius: 50px; + display: block; + height: 24px; + width: 65px; + border: 1px solid #ccc; + left: 33%; + float: none; +} +#afui input.toggle:checked + label { + background: #1eb0e9; + line-height: -1em; +} +#afui input.toggle + label > span { + display: block; + width: 28px; + height: 28px; + background: #ccc; + border-radius: 50px; + z-index: 5; + top: -2px; + left: 0px; + position: absolute; + transition: transform 100ms linear; + transform: translate3d(0, 0, 0); + -webkit-transform: translate3d(0, 0, 0); + -webkit-transition: -webkit-transform 100ms linear; +} +#afui input.toggle:checked + label > span { + transform: translate3d(37px, 0, 0); + -webkit-transform: translate3d(37px, 0, 0); +} +#afui .formGroupHead { + font-size: 18px; + font-weight: bold; + color: inherit; + margin: 16px 0 8px; +} + + +#afui input[type=button], +#afui input[type=submit], #afui button { + font-size:inherit; +} +#afui .button { + position:relative; + display:inline-block; + padding:8px 12px; + margin:8px 0; + font-weight:bold; + color:#000; + text-align:center; + vertical-align:top; + cursor:pointer; + background-color:#eee; + border:1px solid #666; + border-radius:6px; + /*box-shadow: 0 1px 0 #fff;*/ + + text-decoration: none; + z-index:2; +} + +/* Active */ +#afui .button.pressed { background:#fff; } + +#afui .button.previous { + + margin-left:16px; + padding-left:6px; + border-color:#666 #666 transparent transparent !important; +} +#afui .button.next { + border-color:#666 transparent #666 #666 !important; + margin-right:16px; + padding-right:6px; +} + + +#afui .button.previous::after { + + z-index:-1; + content:''; + position:absolute; + width:25px; height:25px; + background-color:inherit; + top:3px; left:-11px; + border-radius:5px; + border:1px solid; + border-color:transparent transparent inherit transparent; + -webkit-transform:rotate(45deg); transform:rotate(45deg); +} +#afui .button.next::after { + z-index:-1; + content:''; + position:absolute; + width:25px; height:25px; + background-color:inherit; + top:3px; right:-11px; + border-radius:5px; + border:1px solid; + border-color:transparent transparent transparent transparent; + -webkit-transform:rotate(45deg); transform:rotate(45deg); +} + +#afui .button.block { display:block; } + +#afui .button.flat { + border-radius: 0; + box-shadow:none; +} + +#afui .header .button-grouped>.button { + margin:0; + border-color:#fff; +} + +#afui .button-grouped { + display:inline-block; + margin: 5px; +} +#afui .button-grouped * { + border-radius:0px; + float:left; + border-left:0px solid transparent; + border-right: 1px solid #666; + border-bottom: 1px solid #666; + border-top: 1px solid #666; + margin:0; +} +#afui .button-grouped > .button:first-child { + border-left: 1px solid #666; + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +#afui .button-grouped > .button:last-child { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} + +#afui .button-grouped.flex { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +#afui .button-grouped.flex > .button { + -webkit-box-flex: 1; + -moz-box-flex: 1 auto; + -webkit-flex: 1 auto; + -ms-flex: 1 auto; + flex: 1 auto; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +#afui .button-grouped.flex.vertical { + display: inline-block; +} + +#afui .button-grouped.vertical * { + border-radius:0px; + display:block; + float:none; + width:100%; + border-left: 1px solid #666; + border-right: 1px solid #666; + border-top: 1px solid #666; + border-bottom: 0px solid #666; +} + +#afui .button-grouped.vertical > .button:first-child { + border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-bottom-left-radius:0px; + border-bottom-right-radius:0px; +} +#afui .button-grouped.vertical > .button:last-child { + border-top-right-radius:0px; + border-top-left-radius:0px; + border-bottom-right-radius: 6px; + border-bottom-left-radius: 6px; + border-bottom:1px solid #666; +} + + +#afui .button.gray { + background:#999; + border-color:#666; +} + +#afui .button.yellow { + background-color:#F1C222; + border-color:#999; +} + +#afui .button.red { + color:#fff; + text-shadow:0 -1px 0 #666; + background:#B20000; + border-color:#666; +} + +#afui .button.green { + color:#fff; + text-shadow:0 -1px 0 #666; + background:#009C0C; + border-color:#666; +} + +#afui .button.orange { + color:#fff; + text-shadow:0 -1px 0 #666; + background-color:#FF8000; + border-color:#666; +} + +#afui .button.black { + color:#fff; + text-shadow:none; + background:#000; + border-color:#666; +} + +#afui .button.slate { + color:#fff; + text-shadow:0 -1px 0 #000; + background:#171F28; + border-color:#666; +} + +#afui .header .button { + color: #fff; + background:none; + border-color: transparent; + font-size:12px; + padding:7px; + height:32px; + margin:5px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.header .button.icon:before{ + padding-left:6px; +} + +#afui .backButton { + text-overflow: ellipsis; + white-space: nowrap; +} + +#afui .af-badge { + position:absolute; + top:2px; right:2px; + display:inline-block; + min-width:20px; max-width:90%; height:20px; + padding:0 3px; + background-color:red; + border-radius:20px; + + font-size:12px; + line-height:19px; + font-weight:bold; + + color:#fff; + text-overflow:ellipsis; + text-align:center; + text-shadow:0 -1px 0 rgba(64,0,0,.6); +} + +#afui .af-badge.br { bottom:2px; right:2px; top:auto; left:auto; } +#afui .af-badge.bl { bottom:2px; left:2px; top:auto; right:auto; } +#afui .af-badge.tl { top:2px; left:2px; right:auto; bottom:auto; } + + +#afui .grid { + width: 100%; + overflow:hidden; /* hack to take up height*/ +} +#afui .col2, +#afui .col3, +#afui .col1-3, +#afui .col2-3 { + float: none; + width: 100%; +} +#afui .grid:after { + content: ''; + clear: both; +} +@media handheld, only screen and (min-width: 768px) { + #afui .col2 { + width: 50%; + float: left; + } + #afui .col3 { + width: 33.3%; + float: left; + } + #afui .col1-3 { + width: 33.3%; + float: left; + } + #afui .col2-3 { + width: 66.6%; + float: left; + } +} +/* Bg #33B5E5 + +/* Font header #C6C6C6 + * reg white-space: + + border 303030 + hover : #111 + + */ + +#afui.android { + font:14px 'Roboto',sans-serif; + background:#000; + color:#fff; + border-color:#fff; +} + +#afui.android.light { + background:#FDFDFD; + color:#000; +} + +#afui.android .header { + background:inherit; + color:inherit; + border-color:#33B5E5; +} + +#afui.android .header .button { + color: inherit; + background:none; + font-size:14px; + box-shadow:none; +} + +#afui.android .backButton{ + background: inherit; + color:inherit; +} + +#afui.android .menuButton:after { + border-color:white; +} + +#afui.android.light .menuButton:after { + border-color:black; +} + +#afui.android .footer { + box-shadow: none; + background:inherit; + border-top:2px solid #33B5E5; + border-bottom:none; + padding:0; +} + +#afui.android .footer>footer>a:not(.button) { + color:inherit; + top:0px; +} + +#afui.android .footer>footer>a.pressed:not(.button) { + border:0px; + border-top:4px solid #33B5E5; + border-radius:0px; + background:none; +} + +#afui.android .footer>footer>a.icon.pressed:not(.button):before { + color:inherit; +} + +#afui.android .af-badge { + border:none; +} + +#afui.android .panel, #afui.android #modalContainer { + background:inherit; + color:inherit; +} + +#afui.android .list { + background:inherit; + color:inherit; + border-color:#303030; +} + +#afui.android .list .divider { color:black; } + +#afui.android .panel h2 { color:inherit; } + + +#afui.android .collapsed:after {border-top: 6px solid;} +#afui.android .collapsed:before {border:2px solid;} +#afui.android .expanded:after {border-bottom: 6px solid;} +#afui.android .expanded:before {border:2px solid;} + +#afui.android .collapsed:before,#afui.android .expanded:before { + border-color: inherit; +} + +#afui.android .collapsed:after, +#afui.android .expanded:after{ + border-top-color:inherit; + border-top-color:inherit; +} + +#afui.android .afScrollbar {background:white !important;} +#afui.android.light .afScrollbar {background:black !important;} + +#afui.android select, #afui.android textarea, #afui.android input[type="text"], +#afui.android input[type=search], #afui.android input[type="password"], +#afui.android input[type="datetime"], #afui.android input[type="datetime-local"], +#afui.android input[type="date"], #afui.android input[type="month"], +#afui.android input[type="time"], #afui.android input[type="week"], +#afui.android input[type="number"], #afui.android input[type="email"], +#afui.android input[type="url"], #afui.android input[type="tel"], +#afui.android input[type="color"], #afui.android .input-group { + background:inherit; + color:inherit; +} + +#afui.android input[type="range"] { + -webkit-appearance: none; +background-color: #ccc; +height: 4px; +position: relative; +top: -10px; +margin-top: 15px; +} + +#afui.android input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + position: relative; + + z-index: 1; + width: 11px; + height: 21px; + + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); + background-image: gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); +} + +#afui.android input.toggle+label:after { color:inherit; } + +#afui.android input.toggle+label { border-radius:0; } + +#afui.android input.toggle+label > span { + border-radius:0; + top:0; + width:27px; + height:23px; +} + +#afui.android label { color:inherit; } + +#afui.android input[type="radio"]:checked+label:before,#afui.android input[type="checkbox"]:checked+label:before { + background: #33B5E5; +} + +#afui.android > #aside_menu, +#afui.android > #menu { + border-right:1px solid rgba(128,128,128,0.5); + color:inherit; + background:inherit; +} + +#afui.android #aside_menu .list li, +#afui.android #menu .list li { + box-shadow:none; + border-color:#ccc; +} + +#afui.android #aside_menu .list .divider, +#afui.android #menu .list .divider { + background:inherit; + color:inherit; + font-size: 1em; +} + +#afui.android #aside_menu .list > li > a, +#afui.android #menu .list > li > a { + background:inherit; + color:inherit; + font-size: 1em; +} + +#afui.android #aside_menu .list, +#afui.android #menu .list { + font-weight: normal; +} + +#afui.android .button { + border-radius:0; + border:none; + background:#424343; + border-color:transparent; + color:inherit; + text-shadow:none; + box-shadow: inset 0 1px 0 rgba(255,255,255,.4); +} + +#afui.android.light .button { + background:#eee; + border-color:#D1D1D1; +} + +#afui.android .button.pressed, +#afui.android .header .button-grouped > .button.pressed { + background:#33B5E5; + border-color:#33B5E5; +} + +#afui.android .button.previous::after { + width:20px; height:20px; + background-color:inherit; + top:5px; left:-12px; + border-radius:0; + box-shadow:none; + border-color:transparent; +} + +#afui.android .button.next::after { + width:20px; height:20px; + background-color:inherit; + top:5px; right:-12px; + border-radius:0; + box-shadow:none; + border-color:transparent; +} + +#afui.android .header .button-grouped > .button { + border-color:#777; +} + +#afui.android .button-grouped * { + border:1px solid rgba(255,255,255,.25); + border-left-width:0; + box-shadow:none; +} + +#afui.android .button-grouped.vertical * { + border-left:1px solid rgba(255,255,255,.25); + border-bottom-width:0; +} + +#afui.android .button-grouped.vertical .button:last-child { + border-bottom:1px solid rgba(255,255,255,.25); +} + +#afui.android .afPopup { + border: solid 1px #aaa; + padding: 0; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-transform:none; + transform:none; + -webkit-transition: none; + transition:none; + background:inherit; + background-color:rgba(0,0,0,0.9); + color:inherit; +} + +#afui.android.light .afPopup { + background-color:rgba(255,255,255,0.9); +} + +#afui.android .afPopup>HEADER{ + font-weight:normal; + font-size:20px; + text-align:left; + padding:10px; +} + +#afui.android .afPopup>DIV{ + font-size:14px; + text-align:left; + padding:10px; + margin:0; + border-top: solid 1px #aaa; + border-bottom: solid 1px #aaa; +} + +#afui.android .afPopup>FOOTER { + background:#bbb; +} + +#afui.android .afPopup>FOOTER>A, #afui.android.light .afPopup>FOOTER>A { + background:#fff; + color:#111; +} + +#afui.android .afPopup>FOOTER>A#cancel{ + margin-left:10px; + width:120px; +} + +#afui.android .afPopup>FOOTER>A#action{ + margin-right:10px; + width:120px; +} + +#afui.android .afPopup>FOOTER>A.center{ + margin:8px; +} + +#afui.android #af_actionsheet { + border: #666 1px solid; + border-top: #33B5E5 3px solid; + background:#555; + color:inherit; + margin:-20px 20px 0 20px; + padding:0px; +} + +#afui.android.light #af_actionsheet { + border: #bbb 1px solid; + border-top: #33B5E5 3px solid; + background:#bbb; +} + +#afui.android #af_actionsheet a{ + border-radius:0; + -webkit-border-radius:0; + border:0px solid #777; + background:#424343; + color:inherit; + line-height: 50px; + margin-bottom: 1px; +} + +#afui.android.light #af_actionsheet a{ + background:#fff; +} + +#afui.android #af_actionsheet a.cancel{ + margin-bottom: 0px; +} + +/* Bg #00ABA9 + +/* Font header #C6C6C6 + * reg white-space: + + border 303030 + hover : #111 + + */ +@-ms-viewport{ + width: device-width; +} +@font-face { + font-family: 'win8back'; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRk9UVE8AAARUAAsAAAAABmgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAAAS4AAAGZpdvO1kZGVE0AAAI4AAAAGgAAABxnmGDwR0RFRgAAAlQAAAAdAAAAIAAwAARPUy8yAAACdAAAAEsAAABgL9zcQGNtYXAAAALAAAAAOgAAAVLgE/LMaGVhZAAAAvwAAAAuAAAANvx5/t1oaGVhAAADLAAAAB4AAAAkBBD/5GhtdHgAAANMAAAADAAAAAwEAAACbWF4cAAAA1gAAAAGAAAABgADUABuYW1lAAADYAAAAOgAAAGPgxEkPHBvc3QAAARIAAAADAAAACAAAwAAeJxtTj1PAkEUnD0WQbwAEomYnEdlDxbGQu0Ua+2sULFAEhIEY0WiNJisITE5G2lo6Iw1/gULKxMTSypLCz+2UMe7A6+ymTczb2bfCkgJIcTkSbm6vLe7X4EwILCm5w1th3RGKjOkTGnHMLedolIBMSOqoh3dCFtoJSwgaaE9bSFqicsUpPdGFAnMIntcLa/ncjl3bLjj70xwDhBtcY6Q1zDwIRD/dPRRmrgo3BK1wRbZcRnrHqsH8h/PD49qQTfwsvyxTyGJZt8mDp6HY/Bls18krxf8RY9s7Qw96HlecQy+9BajiB92a1nyceWGYuL7zf3yw5RB3oWeyPz72QRxeL9KXi1Jstt9UWRtkCQ6m3kXCq8eWyRKpYwKx5VuyC9HO5G4dmZUWpmxXzJhtKEAAHicY2BgYGQAgjO2i86D6LNr4wVgNABJKQZOAAB4nGNgZGBg4ANiCQYQYGJgBEIQyQLmMQAABGAANQAAAHicY2BmYmCcwMDKwMHow5jGwMDgDqW/MkgytDAwMDGwMjPAgQCCyRCQ5prC4PCA4QMD44P/Dxj0GB8wKDQwMDDCFSgAISMAEEIMHwB4nGNgYGBmgGAZBkYGEPAB8hjBfBYGAyDNAYRMIIkHDB8Y/v9HZikwCjBBdYEBIxsDMndEAgDJXAiuAAB4nGNgZGBgAGK+Bx4V8fw2Xxm4mRhA4OzaeAEE/f8BEwPjAyCXgwEsDQAU3gn7AAB4nGNgZGBgfPD/AYMeEwMDwz8GIAkUQQHMAG3nA/YAAAIAAAACAAACAAAAAAAAUAAAAwAAeJx9jjFOw0AQRZ8TJ4BACFHQ0KxEiWzZRomiHMAHSJHeiVaWRWRLm0QpuActZ6DlGByAM3AEvsPQUGSl0b79+2fmA1e8EtGfiHNujQec8Wg85IEX41ied+MRl3waj6V/yxnFF1Jujl09D7jm3nhIyZNxLM+b8Yg7PozH0r840NAyY0XFmmc4NO1sVa1FCzw1ezb6Cnr6er+pBCWdWnbHO8jhcRSkZLrnqv8jf9UpCRNVIV+ucJRduyu7UHtXpJmbu7/FwmkySYosl+lEvKUWB7Yy9HGchvYRWPqwbbrW5Wl2qv0H0Z06yHicY2BmwAsAAH0ABA==) format('woff'), + url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTWeYYPAAAAWMAAAAHEdERUYAMgAGAAAFbAAAACBPUy8yL7rcHwAAAVgAAABWY21hcOAV89MAAAHEAAABUmdhc3D//wADAAAFZAAAAAhnbHlmEDC/5gAAAyQAAAB0aGVhZPx5/t0AAADcAAAANmhoZWEEEP/mAAABFAAAACRobXR4BKoAAgAAAbAAAAAUbG9jYQAsADoAAAMYAAAADG1heHAASgAcAAABOAAAACBuYW1lgxEkPAAAA5gAAAGPcG9zdJtVPjcAAAUoAAAAPAABAAAAAQAAWPDPKV8PPPUACwIAAAAAAM2tXxAAAAAAza1fEAAA/+ACAAHgAAAACAACAAAAAAAAAAEAAAHg/+AALgIAAAD+AAIAAAEAAAAAAAAAAAAAAAAAAAAFAAEAAAAFABkAAwAAAAAAAgAAAAEAAQAAAEAAAAAAAAAAAQIAAZAABQAIAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAIABQMAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUGZFZABA4ADwAAHg/+AALgHgACCAAAABAAAAAAAAAgAAAAAAAAAAqgAAAgAAAgAAAAAAAAADAAAAAwAAABwAAQAAAAAATAADAAEAAAAcAAQAMAAAAAgACAACAAAAAOAA8AD//wAAAADgAPAA//8AACADEAQAAQAAAAAAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAA6AAMAAv/iAf4B3gAHAA8AGAAAACIGFBYyNjQCIiY0NjIWFCU3IwcXMyczNQFp0pWV0pWgvIaGvIb+8Gtkj49ka84B3pXSlZXS/rOGvIaGvIFrjo5rRgAAAAABAAD/4AIAAeAAAgAAEQEhAgD+AAHg/gAAAAAAAAAMAJYAAQAAAAAAAQAIABIAAQAAAAAAAgAHACsAAQAAAAAAAwAjAHsAAQAAAAAABAAIALEAAQAAAAAABQALANIAAQAAAAAABgAIAPAAAwABBAkAAQAQAAAAAwABBAkAAgAOABsAAwABBAkAAwBGADMAAwABBAkABAAQAJ8AAwABBAkABQAWALoAAwABBAkABgAQAN4AdwBpAG4AOABiAGEAYwBrAAB3aW44YmFjawAAUgBlAGcAdQBsAGEAcgAAUmVndWxhcgAARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIAB3AGkAbgA4AGIAYQBjAGsAIAA6ACAANgAtADUALQAyADAAMQAzAABGb250Rm9yZ2UgMi4wIDogd2luOGJhY2sgOiA2LTUtMjAxMwAAdwBpAG4AOABiAGEAYwBrAAB3aW44YmFjawAAVgBlAHIAcwBpAG8AbgAgADEALgAwAABWZXJzaW9uIDEuMAAAdwBpAG4AOABiAGEAYwBrAAB3aW44YmFjawAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAgECAQMHdW5pRTAwMAd1bmlGMDAwAAAAAf//AAIAAQAAAA4AAAAYAAAAAAACAAEAAwAEAAEABAAAAAIAAAAAAAEAAAAAzD2izwAAAADNrV8QAAAAAM2tXxA=) format('truetype'); + font-weight: normal; + font-style: normal; +} + + +#afui.win8 { + font:14px "Segoe UI Semilight", "HelveticaNeue-light", Helvetica, Arial, sans-serif; + font-size:14px; + background-color:#000; + color:#fff; +} + +#afui.win8.light { + background:#fff; + color:#000; +} + +#afui.win8 .header .button { + color: inherit; + border-color:transparent; + font-size:14px; +} + + + +#afui.win8 .backButton.pressed { + background:inherit; +} + +#afui.win8 .backButton { + color:inherit; + background:inherit; + margin:0; + font-family: 'win8back'; + width:0px; + height:0px; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + padding:0px; + margin:0px; + border:none; + position:absolute; + left:-185px; + -webkit-font-smoothing: antialiased; +} + +#afui.win8 .backButton::before { + content: "\e000"; + font-size:30px; + position:absolute; + top:10px; + right:-225px; + left:auto; + color:inherit; + font-family:inherit; + -webkit-transform:none; + transform:none; +} + +#afui.win8 .header h1 { + text-align: left; + color:inherit; +} + +#afui.win8 .header{ + border:0px; + background: inherit; + border-bottom:inherit; + color:inherit; +} + +#afui.win8 .footer { + padding:0px; + background:inherit; + text-align: center; + height:65px; + background:rgba(33,32,33,.9); + border-top:none; +} + +#afui.win8.light .footer{ + background:#F2F2F2; + color:black; +} + +#afui.win8 .footer>footer>a:not(.button) { + position: relative; + width: 56px !important; + height: 56px; + display: inline-block; + font: normal 9px/85px Segoe WP, Segoe UI, Verdana, Helvetica, Sans-Serif; + text-decoration: none; + color: inherit; + text-align: center; + text-shadow: 0 0 rgba(0, 0, 0, 0); + overflow: hidden; + background:inherit; + -webkit-backface-visibility: hidden; + -webkit-perspective: 1000; +} + +#afui.win8.light .footer>footer>a:not(.button) { + text-shadow: 0 0 rgba(0, 0, 0, 0); +} + +#afui.win8 .footer>footer>a.icon.pressed:not(.button):before { + background-color: #00ABA9; +} + +#afui.win8 .footer>footer>a.icon:not(.button):before { + top: 0px; + left: 10px; + font-size:19px; + width:auto; + padding: 5px; + border: 3px solid #fff; + border-radius: 20px; +} + +#afui.win8.light .footer>footer>a.icon:not(.button):before { + border: 3px solid #000; +} + +#afui.win8 .footer>footer>a:not(:last-of-type):not(.button){ + border:none; +} + +#afui.win8 .af-badge { + border:none; +} + +#afui.win8 #content,#afui.win8 #content > .panel { + background:inherit; + color:inherit; +} + +#afui.win8 .list { + background:inherit; + color:inherit; + border-color:#303030; +} + +#afui.win8 .list .divider, #afui.win8 #menu.tabletMenu .list .divider { + background:#00ABA9; + padding:5px; + display:inline; + font-size:16px; + font-weight:normal; + border-top:none; + border-bottom:none; + color:inherit; +} + +#afui.win8 .list li { + border-top:none; + border-bottom:none; + font-size:20px; +} + +#afui.win8 .panel h2 { + color:inherit; + font-weight:normal; + font-size:34px; + line-height:34px; + height:auto; +} + +#afui.win8 .collapsed:after {border-top: 6px solid;} +#afui.win8 .collapsed:before {border:2px solid;} +#afui.win8 .expanded:after {border-bottom: 6px solid;} +#afui.win8 .expanded:before {border:2px solid;} + +#afui.win8 .collapsed:before,#afui.win8 .expanded:before { + border-color: inherit; +} + +#afui.win8 .collapsed:after, +#afui.win8 .expanded:after{ + border-top-color:inherit; + border-top-color:inherit; +} + +#afui.win8 .afScrollbar {background:white !important;} +#afui.win8.light .afScrollbar {background:black !important;} + +#afui.win8 select, #afui.win8 textarea, #afui.win8 input[type="text"], #afui.win8 input[type="search"], #afui.win8 input[type="password"], #afui.win8 input[type="datetime"], #afui.win8 input[type="datetime-local"], #afui.win8 input[type="date"], #afui.win8 input[type="month"], #afui.win8 input[type="time"], #afui.win8 input[type="week"], #afui.win8 input[type="number"], #afui.win8 input[type="email"], #afui.win8 input[type="url"], #afui.win8 input[type="tel"], #afui.win8 input[type="color"], #afui.win8 .input-group { + background:black; + color:inherit; +} + +#afui.win8.light select, #afui.win8.light textarea, #afui.win8.light input[type="text"], #afui.win8.light input[type="search"], #afui.win8.light input[type="password"], #afui.win8.light input[type="datetime"], #afui.win8.light input[type="datetime-local"], #afui.win8.light input[type="date"], #afui.win8.light input[type="month"], #afui.win8.light input[type="time"], #afui.win8.light input[type="week"], #afui.win8.light input[type="number"], #afui.win8.light input[type="email"], #afui.win8.light input[type="url"], #afui.win8.light input[type="tel"], #afui.win8.light input[type="color"], #afui.win8.light .input-group { + background:white; +} + +#afui.win8 input.toggle+label:after { + color:inherit; +} + +#afui.win8 input.toggle+label { + border-radius:0; +} + +#afui.win8 input.toggle:checked+label { + background:#00ABA9; +} + +#afui.win8 input.toggle+label > span { + border-radius:0; + top:0; + width:27px; + height:23px; +} + +#afui.win8 input[type="radio"]:checked+label:before,#afui.win8 input[type="checkbox"]:checked+label:before { + background: #00ABA9; +} + +#afui.win8 > #menu { + border-right:1px solid rgba(128,128,128,0.5); + color:inherit; + background:inherit; +} + +#afui.win8 > #aside_menu { + border-left:1px solid rgba(128,128,128,0.5); + color:inherit; + background:inherit; + border-right:0; +} + +#afui.win8 #menu .list .divider { + padding:4px; + line-height:30px; + margin-left:10px; +} + +#afui.win8 #menu .list { + font-weight: normal; +} + +#afui.win8 #menu .list li,#afui.win8 #menu .list .divider { + box-shadow:none; +} + +#afui.win8 .button { + border-radius:0; + border:none; + background:inherit; + border:3px solid #fff; + color:inherit; + text-shadow:none; + box-shadow:none; +} + +#afui.win8.light .button { + border:3px solid #000; +} + +#afui.win8 .button.pressed { + background:#00ABA9; +} + +#afui.win8 .button.next, #afui.win8 .button.previous { + border-color: #fff !important; +} +#afui.win8 .button.next::after, #afui.win8 .button.previous::after{ + border:none; +} + +#afui.win8 .button-grouped > .button{ + border:3px solid #fff; + border-right:0; +} + +#afui.win8 .button-grouped > .button:last-child { + border-right:3px solid #fff; +} + +#afui.win8 .button-grouped > .button:first-child, +#afui.win8 .button-grouped > .button:last-child { + border-radius:0; +} + +#afui.win8 .button-grouped.vertical >.button{ + border:3px solid #fff; + border-bottom:0; +} + +#afui.win8 .button-grouped.vertical > .button:last-child { + border-bottom:3px solid #fff; +} + +#afui.win8 .header .button-grouped > .button{ + border-color: #fff; +} + +#afui.win8 .header .button-grouped > .button.pressed{ + background:#00ABA9; +} + +#afui.win8.light .button-grouped > .button, +#afui.win8.light .button-grouped.vertical > .button, +#afui.win8.light .header .button-grouped > .button{ + border-color: #111; +} + +/** + * code specific to WP8 + */ +@media handheld, only screen and (max-width: 768px){ + #afui.win8 #menu { + display: none; + position: absolute; + left: 0; + bottom: 0; + z-index: 1000; + width:100%; + height: 150px; + font-size:20px; + top:auto; + background:inherit; + color:inherit; + -webkit-transition-timing-function: linear; + transition-timing-function: linear; + -webkit-transform:translate3d(0,150px,0); + transform:translate3d(0,150px,0); + } + #afui.win8 .hasMenu,#afui.win8 .hasMenu.on{ + + -webkit-transform:translate3d(0,0,0); + transform:translate3d(0,0,0); + } + #afui.win8 .header #menubadge { + display:none; + } +} + +#afui.win8 .afPopup { + width: 100%; + border: solid 0px #72767b; + left:0px !important; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-transform:none; + transform:none; + -webkit-transition: none; + transition:none; + top: 0 !important; + background:#222; + color:inherit; + padding:15px; +} + +#afui.win8.light .afPopup { + background:#eee; +} + +#afui.win8 .afPopup>HEADER{ + font-size:20px; +} + +#afui.win8 .afPopup>DIV{ + font-size:16px; + padding:10px 0; + margin:0; +} + +#afui.win8 .afPopup>FOOTER{ + width:100%; + text-align:left; + display:block !important; +} + +#afui.win8 .afPopup>FOOTER>A#cancel{ + float:left; + min-width:100px; +} + +#afui.win8 .afPopup>FOOTER>A#action{ + float:left; + min-width:100px; + margin-left:10px; +} + +#afui.win8 .afPopup>FOOTER>A.center{ + width:auto; +} + +#afui.win8 #af_actionsheet { + background:#aaa; + color:black; +} + +#afui.win8 #af_actionsheet a{ + border-radius:0; + -webkit-border-radius:0; + border:0px solid black; + background-color:transparent; + font-weight:normal; + color:black; + box-shadow: 0px 1px 1px rgba(255,255,255,0); +} + +#afui.win8 #menu .list > li > a { + color:inherit; +} + +@media handheld, only screen and (min-width: 768px){ + + #afui.win8 .footer footer #metroMenu { + display:none; + } + #afui.win8 .footer { + -webkit-transform:translate3d(0,0,0); + transform:translate(0,0); + } + #afui.win8 #menu { + background:inherit; + color:inherit; + font-size:18px; + left:0; + top:0; + width:200px; + } + #afui.win8 #menu .list > li > a:after{ + margin-top:-11px; + } +} + + +#afui.win8 input[type="range"] { + -webkit-appearance: none; + -webkit-appearance: none; +background-color: #ccc; +height: 4px; +position: relative; +top: -10px; +margin-top: 15px; + +} + +#afui.win8 input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + position: relative; + z-index: 1; + width: 15px; + height: 15px; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); + background-image: gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); +} + +#afui.bb { + font-family: "Slate Pro",Slate,"Myriad Pro","BBAlpha Sans",Helvetica; + font-size: 12pt; +} + +#afui.bb .header { + background:#00609E; + background:-ms-linear-gradient(65deg, #00609E 0%,#00AFEE 100%); + background:-webkit-gradient(linear, left bottom, right top, color-stop(0%,#00609E), color-stop(100%,#00AFEE)); + background:-webkit-linear-gradient(65deg, #00609E 0%,#00AFEE 100%); + background:linear-gradient(65deg, #00609E 0%,#00AFEE 100%); + border-style:solid; + border-width:1px; + border-color:#009CE1 transparent #004E92 transparent; +} + +#afui.bb .header h1 { + text-shadow:rgba(0,0,0,0.8) 0 1px 0; + font-weight:normal; +} + +#afui.bb .list { + font-weight: normal; +} + +#afui.bb .backButton { + display: block; + position: absolute; + line-height:60px; + left: 5px; + text-overflow: ellipsis; + font-size: 10px; + padding: 0; + color: #fff; + text-shadow: none; + background-color: transparent; + border:none; + border-color: transparent; + height: 44px; + top:0; + border-radius: 0; + box-shadow:none; + margin: 0; + padding-left: 0; + text-align: center; + width:50px; + padding:0 !important; + margin:0 !important; +} + +#afui.bb .backButton::before { + z-index: -1; + font-size:22px; + position: absolute; + top: -15px; + left: 15px; + text-align: center; + border-radius: 0; + border: none; + border-color: transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + top:1px; + -webkit-transform:rotate(180deg); + transform:rotate(180deg); + background-color: transparent; +} + +#afui.bb .backButton::after { + z-index: -1; + font-size:24px; + content: ' '; + position: absolute; + font-weight:bold; + background-color: transparent; + left:55px; + height:48px; + top:-5px; + width:2px; + background: #0aa9dc; + margin:auto; + text-align: center; + border-radius: 0; + border: none; + border-color: transparent; + box-shadow: none; + -webkit-transform: rotate(10deg); + transform: rotate(10deg); +} + +#afui.bb .header .button { + color:#fff; + background:none; + text-shadow:0 -1px 0 #333; + border-color:transparent; +} + +#afui.bb .footer { + border:none; + border-radius:0px; + background:none; + padding:0; + -webkit-box-shadow:none; + box-shadow: none; +} + +#afui.bb .footer>footer>a:not(.button) { + height:49px; + top:0px; + border-top:4px solid #000; + background:#1e1e1e; +} + +#afui.bb .footer>footer>a.pressed:not(.button) { + border:0px; + border-top:4px solid #0aa9dc; + border-radius:0px; + background:#3a3a3a; + color:white; +} + +#afui.bb .footer>footer>a:not(:last-of-type):not(.pressed):not(.button){ + border-right:1px solid black; +} + +#afui.bb .footer>footer>a.icon.pressed:not(.button):before { + color: white; +} + +#afui.bb #aside_menu, +#afui.bb #menu { + border-right:1px solid #bbb; + background: #fff; + color: #000; +} + +#afui.bb #aside_menu .list > li > a, +#afui.bb #menu .list > li > a { + color:inherit; +} + +#afui.bb #aside_menu .list .divider, +#afui.bb #menu .list .divider { + background:#fafafa; + color:black; +} + +#afui.bb .list .divider { + background:#fafafa; + border-top:none; + color:black; + border-bottom: 1px solid #0aa9dc !important; +} + +#afui.bb #aside_menu .list li, #afui.bb #aside_menu .list .divider, #afui.bb #aside_menu .list li:first-child, #afui.bb #aside_menu .list li:last-child, +#afui.bb #menu .list li, #afui.bb #menu .list .divider, #afui.bb #menu .list li:first-child, #afui.bb #menu .list li:last-child { + border-bottom-color :#ccc; +} + +#afui.bb .button , +#afui.bb .button-grouped *, +#afui.bb .button-grouped > .button:first-child, +#afui.bb .button-grouped.vertical *, +#afui.bb .button-grouped.vertical > .button:last-child, +#afui.bb > .header .button-grouped > .button { + border-color:#ccc; +} + +#afui.bb > .header .button-grouped > .button.pressed { + background:#07a; +} + +#afui.bb .panel { + background:#fff; +} + +#afui.bb .afPopup { + border: solid 1px #ccc; + -webkit-border-radius: 3px; + border-radius: 3px; + background:inherit; + color:inherit; + padding:0; +} + +#afui.bb .afPopup>HEADER{ + font-weight:normal; + font-size:20px; + text-align:center; + margin:0; + padding:8px; + color:white; + border-radius: 2px; + background:#00609E; + background:-ms-linear-gradient(65deg, #00609E 0%,#00AFEE 100%); + background:-webkit-gradient(linear, left bottom, right top, color-stop(0%,#00609E), color-stop(100%,#00AFEE)); + background:-webkit-linear-gradient(65deg, #00609E 0%,#00AFEE 100%); + background:linear-gradient(65deg, #00609E 0%,#00AFEE 100%); +} + +#afui.bb .afPopup>DIV{ + text-align:center; + padding:10px; +} + +#afui.bb .afPopup>FOOTER{ + padding:5px; +} + +#afui.bb .afPopup>FOOTER>A#cancel{ + width:120px; +} + +#afui.bb .afPopup>FOOTER>A#action{ + width:120px; +} + +#afui.bb #af_actionsheet { + background:white; + color:inherit; +} + +#afui.bb #af_actionsheet a{ + border-radius:5px; + -webkit-border-radius:5px; + border:1px solid #ccc; + background:#eee; + color:#111; +} + +/** iOS 7 theme */ + +/** Blue color color:rgba(82,155,234,255); */ + +/* border rgba(158,158,158,255) */ + +#afui.ios7 { + font-family:'HelveticaNeue', 'Helvetica Neue',Helvetica, Arial, sans-serif; +} + +#afui.ios7 .header { + background:rgb(249,249,249); + color:inherit; + border:none; + border-bottom:1px solid rgba(158,158,158,255); +} + + +#afui.ios7.overlayStatusbar{ + margin-top: 20px; +background: #f9f9f9; +margin-bottom: -20px; +padding-bottom: 20px; +} + +#afui.ios7 .header .button { + color:rgba(82,155,234,255); + border-color:transparent; + font-size:14px; + font-weight:normal; +} + +#afui.ios7 .header h1 { + color:inherit; + text-shadow:none; +} + +#afui.ios7 .panel, #afui.ios7 #modalContainer { + background:rgba(238,238,238,255); +} + +#afui.ios7 .panel h2 { + color:inherit; +} + +#afui.ios7 .footer { + background:rgb(249,249,249); + color:black; + border-top:1px solid rgba(158,158,158,255); + box-shadow:none; +} + +#afui.ios7 .footer>footer>a:not(.button) { + color:rgba(96,96,96,255); +} + +#afui.ios7 .footer>footer>a.pressed:not(.button) { + border-radius:0; + background:transparent; +} + +#afui.ios7 #menubadge:after { + border-color:rgba(82,155,234,255); +} + +#afui.ios7 .list { + font-weight:normal; +} + +#afui.ios7 > #aside_menu, +#afui.ios7 > #menu { + border-right:1px solid #bbb; + background:rgba(238,238,238,255); + color:inherit; +} + +#afui.ios7 #aside_menu .list li,#afui.ios7 #aside_menu .list .divider,#afui.ios7 #aside_menu .list li:first-child,#afui.ios7 #aside_menu .list li:last-child, +#afui.ios7 #menu .list li,#afui.ios7 #menu .list .divider,#afui.ios7 #menu .list li:first-child,#afui.ios7 #menu .list li:last-child { + border-color:rgb(215,215,215); + font-weight:normal; + box-shadow:none; +} + +#afui.ios7 #aside_menu .list .divider, +#afui.ios7 #menu .list .divider { + background:rgba(238,238,238,255); + color:inherit; + font-size: 1em; + border-bottom:1px solid rgb(215,215,215); +} + +#afui.ios7 #aside_menu .list a, +#afui.ios7 #menu .list a { + color:inherit; +} + +#afui.ios7 #aside_menu .list, +#afui.ios7 #menu .list { + background:white; + font-weight: normal; + color:inherit; +} + +#afui.ios7 .list > li > a:after{ + color:rgba(217,217,217,255); +} + +#afui.ios7 .button { + background-color:transparent; +} + +#afui.ios7 .backButton { + background:rgba(249,249,249,1); + color:rgba(82,155,234,255); + display: block; + position: absolute; + line-height:44px; + left: 25px; + text-overflow: ellipsis; + font-size: 14px; + padding: 0; + text-shadow: none; + background-color: transparent; + border:none; + border-color: transparent; + height: 44px; + top:auto; + border-radius: 0; + box-shadow:none; + margin: 0; + padding-left: 0; + text-align: center; + width:50px; + padding:0 !important; + margin:0 !important; +} + +#afui.ios7 .backButton::before { + z-index: -1; + font-size:22px; + position: absolute; + top: 10px; + left: -20px; + text-align: center; + border-radius: 0; + border: none; + border-color: transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + -webkit-transform:rotate(180deg); + transform:rotate(180deg); + background-color: transparent; +} + +#afui.ios7 .backButton::after { + content: ''; + width:0; + height:0; + border:none; +} + + +#afui.ios7 .button { + box-shadow:none; + border-radius: 0; + border-color:#ccc; + color:rgba(82,155,234,255); + text-shadow:none; +} + +#afui.ios7 .button-grouped * , +#afui.ios7 .button-grouped > .button:first-child, +#afui.ios7 .button-grouped.vertical * , +#afui.ios7 .button-grouped.vertical > .button:last-child, +#afui.ios7 .header .button-grouped > .button { + border-color:rgba(82,155,234,255); +} + +#afui.ios7 .button-grouped > .button.pressed , +#afui.ios7 .header .button-grouped > .button.pressed{ + color:white; + background:rgba(82,155,234,255); +} + +#afui.ios7 .afPopup { + border:1px solid rgba(158,158,158,255); + border-radius:10px; + padding:0; + text-align: center; + color:inherit; + background:rgba(249,249,249,1); +} + +#afui.ios7 .afPopup>HEADER{ + padding:10px 0; +} + +#afui.ios7 .afPopup>DIV{ + padding-bottom:10px; +} + +#afui.ios7 .afPopup>FOOTER{ + border-top:1px solid #aaa; +} + +#afui.ios7 .afPopup>FOOTER>A.center{ + width:100%!important; +} + +#afui.ios7 .afPopup .button { + border: none; + width: 50%; + margin: 0; + background: transparent; + color:rgba(82,155,234,255); + padding:12px 0; +} + +#afui.ios7 .afPopup .button.pressed { + background: transparent; +} + +#afui.ios7 .button.pressed { + font-weight:bold; + background: white; +} + +#afui.ios7 .afPopup a:not(:first-of-type) { + border-left:1px solid rgba(158,158,158,255); +} + +#afui.ios7 #af_actionsheet { + background-color:transparent; + color:black; + padding-left:10px; + padding-right:10px; + border-top: transparent 1px solid; + box-shadow: 0px -1px 2px rgba(0,0,0,0); +} + +#afui.ios7 #af_actionsheet a{ + background-image:none; + text-shadow:none; + box-shadow:none; + font-weight:normal; + border-radius: 0; + border:none; + -webkit-box-shadow:none; + color:rgba(82,155,234,255); + background-color:white; + cursor:pointer; + border-radius:0px; + line-height: 40px; + font-size: 20px; + margin-bottom: 1px; +} + +#afui.ios7 #af_actionsheet a:first-child{ + border-top-left-radius:5px; + border-top-right-radius:5px; +} + +#afui.ios7 #af_actionsheet a:nth-last-child(2){ + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; +} + +#afui.ios7 #af_actionsheet a.cancel{ + font-weight:bold; + margin: 9px 0; + border-radius:5px; +} + +#afui.ios7 #af_actionsheet a.red{ + color:#f44; +} + +#afui.ios7 .footer>footer>a.pressed:not(.button),.footer>footer>a.icon.pressed:not(.button):before { + color:rgba(82,155,234,255); +} + +#afui.ios7 .button.previous { + border:none; +} + +#afui.ios7 .button.next { + border:none; +} + +#afui.ios7 .button.previous::after { + color:rgba(82,155,234,255); + z-index: -1; + font-size:22px; + position: absolute; + top: 2px; + left: -25px; + text-align: center; + border-radius: 0; + border: none; + border-color: transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + -webkit-transform:rotate(180deg); + transform:rotate(180deg); + background-color: transparent; +} + +#afui.ios7 .button.next::after { + color:rgba(82,155,234,255); + z-index: -1; + font-size:22px; + position: absolute; + top: 6px; + right: -25px; + text-align: center; + border-radius: 0; + border: none; + border-color: transparent; + box-shadow: none; + -webkit-transform: none; + transform: none; + font-family: 'chevron'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + content: "\f054"; + background-color: transparent; +} + +#afui.ios7 .button.gray { + color:#999; + background-color:transparent; +} + +#afui.ios7 .button.yellow { + color:#F1C222; + background-color:transparent; +} + +#afui.ios7 .button.red { + color:#b20000; + background-color:transparent; +} + +#afui.ios7 .button.green { + color:#009C0C; + background-color:transparent; +} + +#afui.ios7 .button.orange { + color:#FF8000; + background-color:transparent; +} + +#afui.ios7 .button.black { + color:black; + background-color:transparent; +} + +#afui.ios7 .button.slate { + color:#171F28; + background-color:transparent; +} + +#afui.ios7 .af-badge { + border:none; + box-shadow:none; + font-size:12px; +} + +#afui.ios7 input[type="range"] { + -webkit-appearance: none; +background-color: #333; +height: 4px; +position: relative; +top: -10px; +margin-top: 15px; +border-radius:2px; +} + +#afui.ios7 input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + position: relative; + z-index: 1; + width: 15px; + height: 15px; + -webkit-border-radius: 40px; + border-radius: 40px; + border:1px solid #333; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); + background-image: gradient(linear, left top, left bottom, color-stop(0%,#ccc), color-stop(100%,#ccc)); +} + +/* iOS theme */ +#afui.ios { + color:black; +} + +#afui.ios .header { + background-color:#889BB3; + background-image:-ms-linear-gradient(top, #B3BECD 0%, #889BB3 50%, #6E84A2 51%); + background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #B3BECD), color-stop(.5, #889BB3), color-stop(.51, #6E84A2)); + background-image:-webkit-linear-gradient(top, #B3BECD 0%, #889BB3 50%, #6E84A2 51%); + background-image:linear-gradient(to bottom, #B3BECD 0%, #889BB3 50%, #6E84A2 51%); + border: 1px solid; + border-color:#CCD2DA transparent #2D3033 transparent; + color:white; +} + +#afui.ios .header h1 { + text-shadow: rgba(0,0,0,0.8) 0 -1px 0; +} + +#afui.ios .af-badge { + border:2px solid #fff; + box-shadow:0 1px 2px #555; + line-height:18px; +} +#afui.ios .panel, #afui.ios #modalContainer { + background:#e7e7e7; +} + +#afui.ios .panel h2 { color:inherit;} + +#afui.ios .footer { + background-color:#000; + background-image:-ms-linear-gradient(top, #222 0%, #111 50%, #000 51%); + background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #111), color-stop(.51, #000)); + background-image:-webkit-linear-gradient(top, #222 0%, #111 50%, #000 51%); + background-image:linear-gradient(to bottom, #222 0%, #111 50%, #000 51%); + box-shadow:0 1px 0 #555 inset; + + border-top:1px solid #000; +} + +#afui.ios .footer>footer>a.pressed:not(.button) { + background:rgba(255, 255, 255, 0.13); + border-radius:6px; +} + +#afui.ios .footer>footer>a.icon.pressed:not(.button):before { + color:#3a9de2; +} + +#afui.ios > #aside_menu, +#afui.ios > #menu.tabletMenu { + border-right:none; + background:#000; + color:#fff; +} + +#afui.ios .backButton { + line-height:15px; + width:58px; + display:block; + position:absolute; + top:5px; left:5px; + text-overflow:ellipsis; + font-size:12px; + padding:7px !important; + color:#fff; + text-shadow:0 -1px 0 #333; + background-color:#476999; + background-image: none !important; + border:1px solid; + border-color:#375073 #375073 #375073 transparent; + height:32px; + border-radius:5px; + box-shadow:0 1px 0 #9CABC0; + margin:0 0 0 15px !important; + padding-left:4px !important; +} /* Sets up positioning of the back button which appears in the header */ + +#afui.ios .backButton::before { + z-index:-1; + content:''; + position:absolute; + width:24px; height:24px; + background-color:#476999; + top:2px; left:-11px; + border-radius:5px; + border:1px solid; + border-color:transparent transparent #9CABC0 transparent; + box-shadow:1px -1px 0 #375073 inset; + -ms-transform:rotate(45deg); -moz-transform:rotate(45deg); -webkit-transform:rotate(45deg); transform:rotate(45deg); +} + +#afui.ios .header .button { + color:#fff; + text-shadow:0 -1px 0 #333; + background-color:#476999; + border:1px solid #375073; + box-shadow:0 1px 0 #9CABC0; + background-image:linear-gradient(to bottom, #9CABC0 0%, #6E84A2 50%, #476999 51%); +} + +#afui.ios .header .button.pressed { + background-image:linear-gradient(to bottom, #6E84A2 0%, #476999 50%, #274979 51%); +} + +#afui.ios .footer .button { + color:#fff; + text-shadow:0 -1px 0 #333; + background-color:#444; + border:1px solid #222; + box-shadow:0 1px 0 #222; + background-image:linear-gradient(to bottom, #555 0%, #333 50%, #111 51%); +} + +#afui.ios .footer .button.pressed { + background-image:linear-gradient(to bottom, #444 0%, #222 50%, #000 51%); +} + +#afui.ios #aside_menu .list li, +#afui.ios #aside_menu .list .divider, +#afui.ios #aside_menu .list li:first-child, +#afui.ios #aside_menu .list li:last-child, +#afui.ios #menu .list li, +#afui.ios #menu .list .divider, +#afui.ios #menu .list li:first-child, +#afui.ios #menu .list li:last-child { + border-color:#101012; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); +} + +#afui.ios #aside_menu .list > li > a, +#afui.ios #menu .list > li > a { + color:#ccc; +} + +#afui.ios #aside_menu .list .divider, +#afui.ios #menu .list .divider { + background:#333; + color:#fff; +} + +#afui.ios .afPopup { + border: solid 2px #fff; + -webkit-box-shadow: 0px 4px 6px #555, 0 0 20px rgba(0,0,0,0.5); + -webkit-border-radius: 10px; + border-radius:10px; + padding: 0; + background: #1b294b; + background-image: -webkit-gradient(linear, left top, left bottom, from(#626c82), to(#1b294b)); +} + +#afui.ios .afPopup >* { + color:white; +} + +#afui.ios .afPopup>HEADER{ + font-weight:bold; + text-align:center; + text-shadow:0 -1px #000; + padding:5px; +} + +#afui.ios .afPopup>DIV{ + text-align:center; +} + +#afui.ios .afPopup>FOOTER>A{ + background-image: -webkit-gradient(linear, left top, left bottom, from(#626c82), to(#1b294b)); + color:white; +} + +#afui.ios .afPopup>FOOTER>A#cancel{ + width:120px; + margin-left:10px; +} + +#afui.ios .afPopup>FOOTER>A#action{ + width:120px; + margin-right:10px; +} + +#afui.ios .afPopup>FOOTER>A.center{ + float:none!important; + width:95%!important; + margin:8px!important; +} + +#afui.ios #af_actionsheet { + background:#595c61; + color:inherit; +} + +#afui.ios #af_actionsheet a{ + border-radius:10px; + -webkit-border-radius:10px; + border:3px solid #111; + background:#eee; + background: linear-gradient(to bottom, #fff 0%,#ccc 100%); + color:#111; + text-shadow:0 1px 0 #fff; +} + +#afui.ios #af_actionsheet a.cancel{ + background:#333; + background: linear-gradient(to bottom, #666 0%,#333 100%); + color:white; + text-shadow:0 -1px 0 #000; +} + +#afui.ios #af_actionsheet a.red{ + background:#d11; + background: linear-gradient(to bottom, #d55 0%,#d11 100%); + color:white; + text-shadow:0 -1px 0 #000; +} + +#afui.ios input[type="range"] { + -webkit-appearance: none; +background-color: #ccc; +height: 2px; +position: relative; +top: -10px; +margin-top: 15px; +} + +#afui.ios input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + position: relative; + + z-index: 1; + width: 15px; + height: 15px; + + -webkit-border-radius: 40px; + border-radius: 40px; + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebf1f6), color-stop(50%,#abd3ee), color-stop(51%,#89c3eb), color-stop(100%,#d5ebfb)); + background-image: gradient(linear, left top, left bottom, color-stop(0%,#ebf1f6), color-stop(50%,#abd3ee), color-stop(51%,#89c3eb), color-stop(100%,#d5ebfb)); +} +#af_actionsheet { + position:absolute; + left:0px; + right:0px; + padding-left:10px; + padding-right:10px; + padding-top:10px; + margin:auto; + background:black; + float:left; + z-index:9999; + border-top:#fff 1px solid; + background:rgba(71,71,71,.95); + background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.4)), to(rgba(255,255,255,0)), color-stop(.08,rgba(255,255,255,.1)), color-stop(.08,rgba(255,255,255,0))); + background-image:-webkit-linear-gradient(top, rgba(255,255,255,.4) 0%, rgba(255,255,255,.1) 8%, rgba(255,255,255,0) 8%); + box-shadow:0px -1px 2px rgba(0,0,0,.4); +} +#af_actionsheet a { + text-decoration:none; + -webkit-transition:all 0.4s ease; + transition:all 0.4s ease; + text-shadow:0px -1px rgba(0,0,0,.8); + padding:0px .25em; + border:1px solid rgba(0,0,0,.8); + text-overflow:ellipsis; + border-radius:.75em; + background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.4)), to(rgba(255,255,255,0)), color-stop(.5,rgba(255,255,255,.1)), color-stop(.5,rgba(255,255,255,0))); + background-image:-webkit-linear-gradient(top, rgba(255,255,255,.5) 0%, rgba(255,255,255,.2) 50%, rgba(255,255,255,0) 50%); + box-shadow:0px 1px 1px rgba(255,255,255,0.7); + display:block; + color:white; + text-align:center; + line-height:36px; + font-size:20px; + font-weight:bold; + margin-bottom:10px; + background-color:rgba(130,130,130,1); +} + +#af_actionsheet a.selected { + background-color:rgba(150,150,150,1); +} + +#af_actionsheet a.cancel { + background-color:rgba(43,43,43,1); +} + +#af_actionsheet a.cancel.selected { + background-color:rgba(73,73,73,1); +} +#af_actionsheet a.red { + color:white; + background-color:rgba(204,0,0,1); +} + +#af_actionsheet a.red.selected { + background-color:rgba(255,0,0,1); +} + + +#mask{ + display:block; + width:100%; + height:100%; + background:#000; + z-index: 999999; + position:fixed; + top:0; + left:0; +} + + + +.afPopup { + display: block; + width: 280px; + float:left; + border: solid 1px #72767b; + -webkit-border-radius: 10px; + border-radius:10px; + padding: 10px; + opacity: 1; + -webkit-transform: scale(1); + transform:scale(1); + position: absolute; + z-index: 1000000; + top: 50%; + left: 50%; + margin: 0px auto; + background: rgba(70,70,70,1); + color:white; +} +.afPopup >* { + color:inherit; +} + +.afPopup.hidden { + opacity: 0; + -webkit-transform: scale(0.1); + +} + +.afPopup.show { + -webkit-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +.afPopup>HEADER{ + font-weight:bold; + font-size:20px; + margin:0; + padding:5px; +} + +.afPopup>DIV{ + font-size:14px; + margin:8px; +} + +.afPopup>FOOTER{ + width:100%; + text-align:center; + display:block !important; +} + +.afPopup>FOOTER>A#cancel{ + float:left; + margin-left:5px; +} + +.afPopup>FOOTER>A#action{ + float:right; + margin-right:5px; +} + +.afPopup>FOOTER>A.center{ + float:none!important; + width:80%; + margin:8px; +} +/** This can be your default scrollbar class. You must use !important to override the default inline styles */ +.scrollBar { + position: absolute !important; + width: 5px !important; + height: 20px !important; + border-radius: 2px !important; + border: 1px solid black !important; + background: black !important; + opacity: 0 !important; +} + #afModalMask { + position:absolute; + top:0px; + left:0px; + width:100%; + height:100%; + background:transparent; + display:none; + z-index:9999; + } + + #afSelectBoxContainer { + position:absolute; + display:block; + width:90%; + max-width:280px; + margin-right:auto; + min-height:100px; + background:#303030; + color:white; + overflow:hidden; + z-index:9999; + max-height:300px; + margin-top: -150px; + top: 50%; + left: 50%; + margin-left: -138px; + } + + + #afSelectBoxfix ul { + list-style-type:none; + padding:0px; + margin:0px; + } + #afSelectBoxfix li { + font-size: 1.1em; + color: #fff; + display: block; + line-height: 2.5em; + padding: 0 1em; + border-bottom: 1px solid #444; + } + #afSelectBoxfix .selected { + background:#33B5E5; + } + + .afFakeSelect { + width: 200px; + height: 30px; + display: inline-block; + border: 1px solid #ccc; + border-radius: 5px; + line-height: 2em; + font-size: 1em; + padding-left: 10px; + position: relative; + padding-right: 35px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .afFakeSelect:after { + position:absolute; + top:5px; + right:5px; + border: 14px solid transparent; + border-top-color: #ccc; + content:''; + } + + #afSelectBoxContainer #afSelectDone,#afSelectBoxContainer #afSelectCancel{ + margin-top:10px; + display: inline-block; + height: 30px; + width: 100px; + background:#33B5E5; + border: 1px solid #33B5E5; + text-align: center; + line-height: 2em; + float: left; + margin-left: 10px; + } + #afSelectBoxContainer #afSelectCancel { + float:right; + margin-right:10px; + } + #afSelectBoxContainer #afSelectClose { + overflow: hidden; + border-bottom: 1px solid #444; + padding-bottom:5px; + } + + select:disabled~.afFakeSelect { + background:#ccc; + color:black; + } diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/www/lib/appframework/appframework.ui.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Touchgui/www/lib/appframework/appframework.ui.min.js Thu Jun 04 14:50:33 2015 +0200 @@ -0,0 +1,302 @@ +/*! intel-appframework - v2.1.0 - 2014-09-25 */ + +/* + Intel + @api private +*/ +if(!window.af||"function"!==typeof af){var af=function(a){function n(a,c,d){var b=r.createDocumentFragment();if(d){for(d=a.length-1;0<=d;d--)b.insertBefore(a[d],b.firstChild);c.insertBefore(b,c.firstChild)}else{for(d=0;d]*>/,w={},C={},L={columncount:!0,fontweight:!0,lineheight:!0,"column-count":!0,"font-weight":!0,"line-height":!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,"z-index":!0,zoom:!0},D="object"===typeof MSApp,v=function(a,c){this.length=0;if(a){if(a instanceof v&&c==q)return a;if(af.isFunction(a))return af(r).ready(a);if(af.isArray(a)&&a.length!=q){for(var d=0;d"))c===r?g(c.getElementById(a.replace("#", +"")),this):g(h(a,c),this);else if("<"===a[0]&&">"===a[a.length-1]||-1!==a.indexOf("<")&&-1!==a.indexOf(">")){var d=r.createElement("div");D?MSApp.execUnsafeLocalFunction(function(){d.innerHTML=a.trim()}):d.innerHTML=a.trim();g(d.childNodes,this)}else g(h(a,c),this);return this},oldElement:void 0,sort:B.sort,slice:B.slice,length:0,setupOld:function(a){if(a==q)return m();a.oldElement=this;return a},map:function(a){var c,d=[],b;for(b=0;ba&&(a+=this.length);if(null===a){a=[];for(var c=0;cd.status||0===d.status&&"file:"===g){if("application/json"===k||"application/json"===c&&!/^\s*$/.test(d.responseText))try{b=JSON.parse(d.responseText)}catch(P){f=P}else if(-1!==k.indexOf("javascript"))try{b= +d.responseText,a.eval(b)}catch(l){console.log(l)}else"application/xml, text/xml"===c?b=d.responseXML:"text/html"===c?(b=d.responseText,m.parseJS(b)):b=d.responseText;0===d.status&&0===b.length&&(f=!0);f?(e.error.call(h,d,"parsererror",f),p.reject.call(h,d,"parsererror",f)):(p.resolve.call(h,b,"success",d),e.success.call(h,b,"success",d))}else f=!0,p.reject.call(h,d,"error"),e.error.call(h,d,"error");e.complete.call(h,d,f?"error":"success")}};d.open(e.type,e.url,e.async);e.withCredentials&&(d.withCredentials= +!0);e.contentType&&(e.headers["Content-Type"]=e.contentType);for(var k in e.headers)"string"===typeof e.headers[k]&&d.setRequestHeader(k,e.headers[k]);if(!1===e.beforeSend.call(h,d,e))return d.abort(),!1;0
"+f+"Cancel
"); +else if("object"===typeof f){b=a("
");var e=a(b.children().get(0));f.push({text:"Cancel",cssClasses:"cancel"});for(var c=0;c"+(f[c].text||"TEXT NOT ENTERED")+"");d[0].onclick=f[c].handler||h;f[c].cssClasses&&0");setTimeout(function(){b.vendorCss("Transition","all 300ms");b.cssTranslate("0,"+-b.height()+"px")},10);a("#af_action_mask").bind("touchstart touchmove touchend click",function(a){a.preventDefault(); +a.stopPropagation()})}else window.alert("Could not find element for actionsheet "+k)};l.prototype={activeSheet:null,hideSheet:function(){var k=this;this.activeSheet.off("click","a",function(){k.hideSheet()});a(this.el).find("#af_action_mask").unbind("click").remove();this.activeSheet.vendorCss("Transition","all 0ms");var f=this.activeSheet,h=this.el;setTimeout(function(){f.vendorCss("Transition","all 300ms");f.cssTranslate("0,0px");setTimeout(function(){f.remove();f=null;h.style.overflow="none"}, +500)},10)}};return l}()})(af); +(function(a){var n=[],l=function(b,e){var c,d;c="string"===typeof b||b instanceof String?document.getElementById(b):a.is$(b)?b[0]:b;c.afCSS3AnimateId||(c.afCSS3AnimateId=a.uuid());d=c.afCSS3AnimateId;n[d]?(n[d].animate(e),c=n[d]):(c=g(c,e),n[d]=c);return c};a.fn.css3Animate=function(a){!a.complete&&a.callback&&(a.complete=a.callback);var e=l(this[0],a);a.complete=null;a.sucess=null;a.failure=null;for(var c=1;ct||"none"===p.display?a.asap(a.proxy(this.finishAnimation,this,[!1])):(this.activeEvent=function(a){clearTimeout(g.timeout);g.finishAnimation(a);g.el.removeEventListener(h,g.activeEvent,!1)},g.timeout=setTimeout(this.activeEvent,numOnly(b.time)+50),this.el.addEventListener(h,this.activeEvent,!1))}else window.alert("Please provide configuration options for animation of "+this.el.id)},addCallbackHook:function(a){a&&this.callbacksStack.push(a);this.countStack++; +return this.linkFinishedProxy},linkFinished:function(a){a?this.cancel():this.finishAnimation()},finishAnimation:function(a){a&&a.preventDefault&&a.preventDefault();this.isActive&&(this.countStack--,0===this.countStack&&this.fireCallbacks(!1))},fireCallbacks:function(a){this.clearEvents();var c=this.callbacksStack;this.cleanup();for(var d=0;d=this.startTime+this.runTime?(g.setPosition(this.animateOpts.x,this.animateOpts.y),g.isAnimating=!1,this.updateCB&&this.updateCB({x:this.animateOpts.x,y:this.animateOpts.y}),this.completeCB&&this.completeCB()):(a=(a-this.startTime)/this.runTime,h=k[this.easingFn](1=h&&(f.el.scrollTop=a.y,clearInterval(f.scrollTopInterval))},10);f.scrollLeftInterval=window.setInterval(function(){f.el.scrollLeft-=e;k++;k>=g&&(f.el.scrollLeft=a.x, +clearInterval(f.scrollLeftInterval))},10)}},enable:function(){},disable:function(){},hideScrollbars:function(){},addPullToRefresh:function(){},_scrollToTop:function(a){this._scrollTo({x:0,y:0},a)},_scrollToBottom:function(a){this._scrollTo({x:0,y:this.el.scrollHeight-this.el.offsetHeight},a)},scrollToBottom:function(a){return this._scrollToBottom(a)},scrollToTop:function(a){return this._scrollToTop(a)},init:function(c,d){this.el=c;this.afEl=a(this.el);this.defaultProperties();for(var b in d)this[b]= +d[b];var e=this,f=function(){e.eventsActive&&(!a.feat.nativeTouchScroll&&(!a.ui||a.ui.activeDiv===e.container))&&e.adjustScroll()};this.afEl.bind("destroy",function(){e.disable(!0);var c=e.el.afScrollerId;l[c]&&delete l[c];a.unbind(a.touchLayer,"orientationchange-reshape",f)});a.bind(a.touchLayer,"orientationchange-reshape",f);a(window).bind("resize",f)},needsFormsFix:function(c){return this.useJsScroll&&this.isEnabled()&&"none"!==this.el.style.display&&0"+this.refreshContent+"")):c=a(this.refreshElement);c=c.get(0);this.refreshContainer=a("
");a(this.el).prepend(this.refreshContainer.prepend(c));this.refreshContainer=this.refreshContainer[0]}, +fireRefreshRelease:function(c){if(this.refresh&&c&&(this.setRefreshContent("Refreshing..."),c=!1!==a.trigger(this,"refresh-release",[c]),this.preventHideRefresh=!1,this.refreshRunning=!0,c)){var d=this;0"),c=a(this.el).find(".p2rhack"));c.css("top",this.el.scrollHeight+this.refreshHeight+1+"px")};b.prototype.onTouchStart=function(a){this.lastScrollInfo={top:0};this.xReset=this.yReset=0;this.verticalScroll&&(0===this.el.scrollTop&&this.refresh&&(this.el.scrollTop=1,this.yReset= +-1),this.el.scrollTop===this.el.scrollHeight-this.el.clientHeight&&this.infinite&&(this.el.scrollTop-=1,this.yReset=1));this.horizontalScroll&&(0===this.el.scrollLeft&&(this.el.scrollLeft=1,this.xReset=-1),this.el.scrollLeft===this.el.scrollWidth-this.el.clientWidth&&(this.el.scrollLeft-=1,this.xReset=1));this.refreshCancelCB&&clearTimeout(this.refreshCancelCB);this.refresh&&this.el.addEventListener("touchend",this,!1);this.el.addEventListener("touchmove",this,!1);this.dY=a.touches[0].pageY;this.dX= +a.touches[0].pageX;this.startTop=this.el.scrollTop;this.startLeft=this.el.scrollLeft;(this.refresh||this.infinite)&&this.refresh&&0>this.dY&&this.showRefresh()};b.prototype.onTouchMove=function(c){var d=c.touches[0].pageY-this.dY,b=c.touches[0].pageX-this.dX,e=this.el.scrollHeight-this.el.scrollTop===this.el.clientHeight&&0>d,f=this.el.scrollWidth-this.el.scrollLeft===this.el.clientWidth&&0>b,h="input"!==c.target.tagName.toLowerCase();this.verticalScroll&&0===this.startTop&&0===this.el.scrollTop&& +0Math.abs(b)&&c.preventDefault();this.refresh&&this.el.scrollTop< +-this.refreshHeight?this.showRefresh():this.refresh&&this.refreshTriggered&&this.refreshRunning&&this.el.scrollTop>this.refreshHeight?(this.refreshRunning=this.refreshTriggered=!1,this.refreshCancelCB&&clearTimeout(this.refreshCancelCB),this.hideRefresh(!1),this.setRefreshContent("Pull to Refresh"),a.trigger(this,"refresh-cancel")):this.refresh&&(this.refreshTriggered&&!this.refreshRunning&&this.el.scrollTop>-this.refreshHeight)&&(this.refreshRunning=this.refreshTriggered=!1,this.refreshCancelCB&& +clearTimeout(this.refreshCancelCB),this.hideRefresh(!1),this.setRefreshContent("Pull to Refresh"),a.trigger(this,"refresh-cancel"));this.cY=d;this.cX=b;this.lastScrollInfo.top=this.cY;this.initScrollProgress&&(a.trigger(this,"scroll",[{x:-this.el.scrollLeft,y:-this.el.scrollTop}]),a.trigger(a.touchLayer,"scroll",[{x:-this.el.scrollLeft,y:-this.el.scrollTop}]))};b.prototype.showRefresh=function(){this.refreshTriggered||(this.refreshTriggered=!0,this.setRefreshContent("Release to Refresh"),a.trigger(this, +"refresh-trigger"))};b.prototype.onTouchEnd=function(){var c=this.el.scrollTop<=-this.refreshHeight;this.fireRefreshRelease(c,!0);this.moved||(this.el.scrollTop+=this.yReset,this.el.scrollLeft+=this.xReset);if(c&&this.refresh){var d=a.create("
");a(this.el).append(d);this.refreshContainer.style.top="0px";this.refreshContainer.style.position="";setTimeout(function(){d.remove()})}this.el.removeEventListener("touchmove", +this,!1);this.el.removeEventListener("touchend",this,!1);this.infiniteEndCheck=!0;this.infinite&&(!this.infiniteTriggered&&this.el.scrollTop>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,a.trigger(this,"infinite-scroll"),this.infiniteEndCheck=!0);this.touchEndFired=!0;var b=this,e=this.el.scrollTop,f=this.el.scrollLeft,h=0;clearInterval(b.nativePolling);b.nativePolling=setInterval(function(){h++;25===h&&b.initScrollProgress&&(a.trigger(b,"scroll",[{x:-b.el.scrollLeft+b.cX, +y:-b.el.scrollTop+b.cY}]),a.trigger(a.touchLayer,"scroll",[{x:-b.el.scrollLeft+b.cX,y:-b.el.scrollTop+b.cY}]));if(200<=h)clearInterval(b.nativePolling),b.initScrollProgress&&(a.trigger(b,"scroll",[{x:-b.el.scrollLeft,y:-b.el.scrollTop}]),a.trigger(a.touchLayer,"scroll",[{x:-b.el.scrollLeft,y:-b.el.scrollTop}]));else if(b.el.scrollTop!==e||b.el.scrollLeft!==f)clearInterval(b.nativePolling),a.trigger(a.touchLayer,"scrollend",[b.el]),a.trigger(b,"scrollend",[b.el]),b.initScrollProgress&&(a.trigger(b, +"scroll",[{x:-b.el.scrollLeft,y:-b.el.scrollTop}]),a.trigger(a.touchLayer,"scroll",[{x:-b.el.scrollLeft,y:-b.el.scrollTop}]))},20)};b.prototype.hideRefresh=function(c){if(!this.preventHideRefresh){var d=this,b=function(c){d.refreshContainer.style.top="-60px";d.refreshContainer.style.position="absolute";d.dY=d.cY=0;c||(d.el.style[a.feat.cssPrefix+"Transform"]="none",d.el.style[a.feat.cssPrefix+"TransitionProperty"]="none",d.el.scrollTop=0,d.logPos(d.el.scrollLeft,0),d.refreshRunning=!1,d.setRefreshContent("Pull to Refresh"), +a.trigger(d,"refresh-finish"))};!1===c||!d.afEl.css3Animate?b():d.afEl.css3Animate({y:d.el.scrollTop-d.refreshHeight+"px",x:"0%",time:"325ms",complete:b});this.refreshTriggered=!1}};b.prototype.hideScrollbars=function(){};b.prototype.scrollTo=function(a,d){this.logPos(a.x,a.y);a.x*=-1;a.y*=-1;return this._scrollTo(a,d)};b.prototype.scrollBy=function(a,d){a.x+=this.el.scrollLeft;a.y+=this.el.scrollTop;this.logPos(this.el.scrollLeft,this.el.scrollTop);return this._scrollTo(a,d)};b.prototype.scrollToBottom= +function(a){this._scrollToBottom(a);this.logPos(this.el.scrollLeft,this.el.scrollTop)};b.prototype.onScroll=function(){this.infinite&&this.touchEndFired?this.touchEndFired=!1:this.scrollSkip?this.scrollSkip=!1:(this.infinite&&(!this.infiniteTriggered&&this.el.scrollTop>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,a.trigger(this,"infinite-scroll"),this.infiniteEndCheck=!0),this.infinite&&(this.infiniteEndCheck&&this.infiniteTriggered)&&(this.infiniteEndCheck=!1,a.trigger(this, +"infinite-scroll-end")))};b.prototype.logPos=function(a,d){this.loggedPcentX=this.divide(a,this.el.scrollWidth);this.loggedPcentY=this.divide(d,this.el.scrollHeight);this.scrollLeft=a;this.scrollTop=d;isNaN(this.loggedPcentX)&&(this.loggedPcentX=0);isNaN(this.loggedPcentY)&&(this.loggedPcentY=0)};b.prototype.adjustScroll=function(){this.adjustScrollOverflowProxy();this.el.scrollLeft=this.loggedPcentX*this.el.scrollWidth;this.el.scrollTop=this.loggedPcentY*this.el.scrollHeight;this.logPos(this.el.scrollLeft, +this.el.scrollTop)};g.prototype.defaultProperties=function(){this.boolScrollLock=!1;this.elementInfo=this.currentScrollingObject=null;this.verticalScroll=!0;this.horizontalScroll=!1;this.scrollBars=!0;this.hscrollBar=this.vscrollBar=null;this.vScrollCSS=this.hScrollCSS="scrollBar";this.firstEventInfo=null;this.moved=!1;this.preventPullToRefresh=!0;this.refreshSafeKeep=this.androidFormsMode=this.isScrolling=!1;this.lastScrollbar="";this.scrollingFinishCB=this.container=this.finishScrollingObject=null; +this.androidPerfHack=this.loggedPcentX=this.loggedPcentY=0};g.prototype.enable=function(a){this.eventsActive||(this.eventsActive=!0,a?this.scrollerMoveCSS({x:0,y:0},0):this.adjustScroll(),this.container.addEventListener("touchstart",this,!1),this.container.addEventListener("touchmove",this,!1),this.container.addEventListener("touchend",this,!1))};g.prototype.adjustScroll=function(){var a=this.getViewportSize();this.scrollerMoveCSS({x:Math.round(this.loggedPcentX*(this.el.clientWidth-a.w)),y:Math.round(this.loggedPcentY* +(this.el.clientHeight-a.h))},0)};g.prototype.disable=function(){if(this.eventsActive){var a=this.getCSSMatrix(this.el);this.logPos(numOnly(a.e)-numOnly(this.container.scrollLeft),numOnly(a.f)-numOnly(this.container.scrollTop));this.container.removeEventListener("touchstart",this,!1);this.container.removeEventListener("touchmove",this,!1);this.container.removeEventListener("touchend",this,!1);this.eventsActive=!1}};g.prototype.addPullToRefresh=function(a,d){d||(this.refresh=!0);this.refresh&&!0=== +this.refresh&&(this.coreAddPullToRefresh(a),this.el.style.overflow="visible")};g.prototype.hideScrollbars=function(){this.hscrollBar&&(this.hscrollBar.style.display="none",this.hscrollBar.style[a.feat.cssPrefix+"TransitionDuration"]="0ms");this.vscrollBar&&(this.vscrollBar.style.display="none",this.vscrollBar.style[a.feat.cssPrefix+"TransitionDuration"]="0ms")};g.prototype.getViewportSize=function(){var a=window.getComputedStyle(this.container);isNaN(numOnly(a.paddingTop))&&window.alert(typeof a.paddingTop+ +"::"+a.paddingTop+":");return{h:this.container.clientHeight>window.innerHeight?window.innerHeight:this.container.clientHeight-numOnly(a.paddingTop)-numOnly(a.paddingBottom),w:this.container.clientWidth>window.innerWidth?window.innerWidth:this.container.clientWidth-numOnly(a.paddingLeft)-numOnly(a.paddingRight)}};g.prototype.onTouchStart=function(c){this.moved=!1;this.currentScrollingObject=null;a(this.el).animateCss().stop();if(this.container&&(this.refreshCancelCB&&(clearTimeout(this.refreshCancelCB), +this.refreshCancelCB=null),this.scrollingFinishCB&&(clearTimeout(this.scrollingFinishCB),this.scrollingFinishCB=null),!(1!==c.touches.length||this.boolScrollLock)&&!(c.touches[0].target&&void 0!==c.touches[0].target.type&&"select"===c.touches[0].target.tagName.toLowerCase()))){var d={top:0,left:0,speedY:0,speedX:0,absSpeedY:0,absSpeedX:0,deltaY:0,deltaX:0,absDeltaY:0,absDeltaX:0,y:0,x:0,duration:0};this.elementInfo={};var b=this.getViewportSize();this.elementInfo.bottomMargin=b.h;this.elementInfo.maxTop= +this.el.clientHeight-this.elementInfo.bottomMargin;0>this.elementInfo.maxTop&&(this.elementInfo.maxTop=0);this.elementInfo.divHeight=this.el.clientHeight;this.elementInfo.rightMargin=b.w;this.elementInfo.maxLeft=this.el.clientWidth-this.elementInfo.rightMargin;0>this.elementInfo.maxLeft&&(this.elementInfo.maxLeft=0);this.elementInfo.divWidth=this.el.clientWidth;this.elementInfo.hasVertScroll=this.verticalScroll||0d.top&&(this.preventPullToRefresh=!0,this.refresh&&(this.refreshContainer.style.overflow="hidden"));d.x=d.left;d.y=d.top;this.setVScrollBar(d,0,0)&&(this.vscrollBar.style.right="0px",this.vscrollBar.style[a.feat.cssPrefix+"Transition"]="",a(this.vscrollBar).animateCss().stop());this.setHScrollBar(d,0,0)&&(this.container.clientHeight>window.innerHeight? +this.hscrollBar.style.top=window.innerHeight-numOnly(this.hscrollBar.style.height)+"px":this.hscrollBar.style.bottom=numOnly(this.hscrollBar.style.height),this.hscrollBar.style[a.feat.cssPrefix+"Transition"]="",a(this.hscrollBar).animateCss().stop());this.lastScrollInfo=d;this.hasMoved=!1;0===this.elementInfo.maxTop&&0===this.elementInfo.maxLeft&&this.lockBounce?this.scrollToTop(0):this.scrollerMoveCSS(this.lastScrollInfo,0);this.scrollerMoveCSS(this.lastScrollInfo,0)}};g.prototype.getCSSMatrix=function(c){if(this.androidFormsMode){var d= +parseInt(c.style.marginTop,10);c=parseInt(c.style.marginLeft,10);isNaN(d)&&(d=0);isNaN(c)&&(c=0);return{f:d,e:c}}return a.getCssMatrix(c)};g.prototype.saveEventInfo=function(a){this.lastEventInfo={pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,time:a.timeStamp}};g.prototype.saveFirstEventInfo=function(a){this.firstEventInfo={pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,time:a.timeStamp}};g.prototype.setVScrollBar=function(a,d,b){if(!this.elementInfo.requiresVScrollBar)return!1;var e=parseFloat(this.elementInfo.bottomMargin/ +this.elementInfo.divHeight)*this.elementInfo.bottomMargin+"px";numOnly(e)>this.elementInfo.bottomMargin&&(e=this.elementInfo.bottomMargin+"px");e!==this.vscrollBar.style.height&&(this.vscrollBar.style.height=e);a=this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.elementInfo.maxTop+a.y)/this.elementInfo.maxTop*(this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height));a>this.elementInfo.bottomMargin&&(a=this.elementInfo.bottomMargin);0>a&&(a=0);this.scrollbarMoveCSS(this.vscrollBar, +{x:0,y:a},d,b);return!0};g.prototype.setHScrollBar=function(a,d,b){if(!this.elementInfo.requiresHScrollBar)return!1;var e=parseFloat(this.elementInfo.rightMargin/this.elementInfo.divWidth)*this.elementInfo.rightMargin+"px";e!==this.hscrollBar.style.width&&(this.hscrollBar.style.width=e);a=this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width)-(this.elementInfo.maxLeft+a.x)/this.elementInfo.maxLeft*(this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width));a>this.elementInfo.rightMargin&& +(a=this.elementInfo.rightMargin);0>a&&(a=0);this.scrollbarMoveCSS(this.hscrollBar,{x:a,y:0},d,b);return!0};g.prototype.onTouchMove=function(c){if(null!==this.currentScrollingObject&&(!c.target||!(c.target.getAttribute("type")&&-1!==c.target.getAttribute("type").toLowerCase().indexOf("range")))){var d=this.calculateMovement(c);this.calculateTarget(d);this.lastScrollInfo=d;this.moved||(a.trigger(this,"scrollstart",[this.el,{x:this.lastScrollInfo.top,y:this.lastScrollInfo.left}]),a.trigger(a.touchLayer, +"scrollstart",[this.el,{x:this.lastScrollInfo.top,y:this.lastScrollInfo.left}]),this.elementInfo.requiresVScrollBar&&(this.vscrollBar.style.display="block"),this.elementInfo.requiresHScrollBar&&(this.hscrollBar.style.display="block"));this.moved=!0;this.refresh&&0===d.top?(this.refreshContainer.style.display="block",this.refreshHeight=this.refreshContainer.firstChild.clientHeight,this.refreshContainer.firstChild.style.top=-this.refreshHeight+"px",this.refreshContainer.style.overflow="visible",this.preventPullToRefresh= +!1):0>d.top&&(this.preventPullToRefresh=!0,this.refresh&&(this.refreshContainer.style.overflow="hidden"));this.saveEventInfo(c);if(!1===this.isScrolling&&(this.isScrolling=!0,this.onScrollStart))this.onScrollStart();c=this.getCSSMatrix(this.el);this.lastScrollInfo.top=numOnly(c.f);this.lastScrollInfo.left=numOnly(c.e);this.recalculateDeltaY(this.lastScrollInfo);this.recalculateDeltaX(this.lastScrollInfo);this.checkYboundary(this.lastScrollInfo);this.elementInfo.hasHorScroll&&this.checkXboundary(this.lastScrollInfo); +c=0this.lastScrollInfo.deltaY,e;if(c||b)d=c?this.lastScrollInfo.y:-this.lastScrollInfo.y-this.elementInfo.maxTop,d=(this.container.clientHeight-d)/this.container.clientHeight,0.5>d&&(d=0.5),e=0,c&&0Math.abs(this.lastScrollInfo.deltaY* +d)&&(b=c?1:-1),this.lastScrollInfo.y=e+b;if(this.elementInfo.hasHorScroll&&(c=0this.lastScrollInfo.deltaX,c||b))d=c?this.lastScrollInfo.x:-this.lastScrollInfo.x-this.elementInfo.maxLeft,d=(this.container.clientWidth-d)/this.container.clientWidth,0.5>d&&(d=0.5),e=0,c&&0Math.abs(this.lastScrollInfo.deltaX*d)&&(b=c?1:-1),this.lastScrollInfo.x=e+b;this.lockBounce&&!this.refresh&&(0this.elementInfo.maxLeft&&(this.lastScrollInfo.x=-1*this.elementInfo.maxLeft),0this.elementInfo.maxTop&&(this.lastScrollInfo.y=-1*this.elementInfo.maxTop));this.scrollerMoveCSS(this.lastScrollInfo,0);this.setVScrollBar(this.lastScrollInfo, +0,0);this.setHScrollBar(this.lastScrollInfo,0,0);this.refresh&&!this.preventPullToRefresh&&(!this.refreshTriggered&&this.lastScrollInfo.top>this.refreshHeight?(this.refreshTriggered=!0,this.setRefreshContent("Release to Refresh"),a.trigger(this,"refresh-trigger")):this.refreshTriggered&&this.lastScrollInfo.top +this.el.clientHeight-this.container.clientHeight&&(this.infiniteTriggered=!0,a.trigger(this,"infinite-scroll"))}};g.prototype.calculateMovement=function(a,d){var b={top:0,left:0,speedY:0,speedX:0,absSpeedY:0,absSpeedX:0,deltaY:0,deltaX:0,absDeltaY:0,absDeltaX:0,y:0,x:0,duration:0},e=d?this.firstEventInfo:this.lastEventInfo,f=d?a.pageX:a.touches[0].pageX,h=d?a.pageY:a.touches[0].pageY,g=d?a.time:a.timeStamp;b.deltaY=this.elementInfo.hasVertScroll?h-e.pageY:0;b.deltaX=this.elementInfo.hasHorScroll? +f-e.pageX:0;b.time=g;b.duration=g-e.time;return b};g.prototype.calculateTarget=function(a){a.y=this.lastScrollInfo.y+a.deltaY;a.x=this.lastScrollInfo.x+a.deltaX;0d)a.y=d;else if(-a.y>b)a.y=-b;else return; +this.recalculateDeltaY(a)};g.prototype.checkXboundary=function(a){var d=this.container.clientWidth/2,b=this.elementInfo.maxLeft+d;if(a.x>d)a.x=d;else if(-a.x>b)a.x=-b;else return;this.recalculateDeltaX(a)};g.prototype.recalculateDeltaY=function(a){var d=Math.abs(a.deltaY);a.deltaY=a.y-a.top;var b=Math.abs(a.deltaY);a.duration=a.duration*b/d};g.prototype.recalculateDeltaX=function(a){var d=Math.abs(a.deltaX);a.deltaX=a.x-a.left;var b=Math.abs(a.deltaX);a.duration=a.duration*b/d};g.prototype.hideRefresh= +function(b){var d=this;if(!this.preventHideRefresh){var e=function(){d.setRefreshContent("Pull to Refresh");a.trigger(d,"refresh-finish")};this.scrollerMoveCSS({x:0,y:0},325);!1===b||!d.afEl.css3Animate?e():d.afEl.css3Animate({time:"325ms",complete:e});this.refreshTriggered=!1}};g.prototype.setMomentum=function(a){a.speedY=this.divide(a.deltaY,a.duration);a.speedX=this.divide(a.deltaX,a.duration);a.absSpeedY=Math.abs(a.speedY);a.absSpeedX=Math.abs(a.speedX);a.absDeltaY=Math.abs(a.deltaY);a.absDeltaX= +Math.abs(a.deltaX);if(0a.deltaY?-1:1)*a.absSpeedY*a.absSpeedY/0.0024,a.absDeltaY=Math.abs(a.deltaY),a.duration=a.absSpeedY/0.0012,a.speedY=a.deltaY/a.duration,a.absSpeedY=Math.abs(a.speedY),0.12>a.absSpeedY||5>a.absDeltaY)a.deltaY=a.absDeltaY=a.duration=a.speedY=a.absSpeedY=0}else if(a.absDeltaX){if(a.deltaX=(0>a.deltaX?-1:1)*a.absSpeedX*a.absSpeedX/0.0024,a.absDeltaX=Math.abs(a.deltaX),a.duration=a.absSpeedX/0.0012,a.speedX=a.deltaX/a.duration,a.absSpeedX=Math.abs(a.speedX), +0.12>a.absSpeedX||5>a.absDeltaX)a.deltaX=a.absDeltaX=a.duration=a.speedX=a.absSpeedX=0}else a.duration=0};g.prototype.onTouchEnd=function(){var b=this;if(null!==this.currentScrollingObject&&this.moved){this.finishScrollingObject=this.currentScrollingObject;this.currentScrollingObject=null;var d=this.calculateMovement(this.lastEventInfo,!0);this.androidFormsMode||this.setMomentum(d);this.calculateTarget(d);var e=this.getCSSMatrix(this.el);d.top=numOnly(e.f);d.left=numOnly(e.e);this.checkYboundary(d); +this.elementInfo.hasHorScroll&&this.checkXboundary(d);e=!this.preventPullToRefresh&&(d.top>this.refreshHeight||d.y>this.refreshHeight);this.fireRefreshRelease(e,0this.elementInfo.maxTop||0===this.elementInfo.maxTop)d.y=-this.elementInfo.maxTop,-d.top>this.elementInfo.maxTop&&(d.duration=325);if(this.elementInfo.hasHorScroll)if(0<=d.x)d.x=0,0<=d.left&&this.refresh&&(d.duration= +325);else if(-d.x>this.elementInfo.maxLeft||0===this.elementInfo.maxLeft)d.x=-this.elementInfo.maxLeft,-d.left>this.elementInfo.maxLeft&&this.refresh&&(d.duration=325);if(d.x===d.left&&d.y===d.top||this.androidFormsMode)d.duration=0;setTimeout(function(){b.scrollerMoveCSS(d,d.duration,"cubic-bezier(0.33,0.66,0.66,1)")});this.setVScrollBar(d,d.duration,"cubic-bezier(0.33,0.66,0.66,1)");this.setHScrollBar(d,d.duration,"cubic-bezier(0.33,0.66,0.66,1)");this.setFinishCalback(d.duration);this.infinite&& +!this.infiniteTriggered&&Math.abs(d.y)>=this.el.clientHeight-this.container.clientHeight&&(b=this,setTimeout(function(){b.infiniteTriggered=!0;a.trigger(b,"infinite-scroll")},d.duration-50))}};g.prototype.setFinishCalback=function(b){var d=this;this.scrollingFinishCB=setTimeout(function(){d.hideScrollbars();a.trigger(a.touchLayer,"scrollend",[d.el]);a.trigger(d,"scrollend",[d.el]);d.isScrolling=!1;d.elementInfo=null;d.infinite&&d.infiniteTriggered&&a.trigger(d,"infinite-scroll-end")},b)};g.prototype.startFormsMode= +function(){if(!this.blockFormsFix){var b=this.getCSSMatrix(this.el);this.refreshSafeKeep=this.refresh;this.refresh=!1;this.androidFormsMode=!0;this.el.style[a.feat.cssPrefix+"Transform"]="none";this.el.style[a.feat.cssPrefix+"Transition"]="none";this.el.style[a.feat.cssPrefix+"Perspective"]="none";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[a.feat.cssPrefix+"Perspective"]="none";this.container.style[a.feat.cssPrefix+"BackfaceVisibility"]="visible";this.vscrollBar&& +(this.vscrollBar.style[a.feat.cssPrefix+"Transform"]="none",this.vscrollBar.style[a.feat.cssPrefix+"Transition"]="none",this.vscrollBar.style[a.feat.cssPrefix+"Perspective"]="none",this.vscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="visible");this.hscrollBar&&(this.hscrollBar.style[a.feat.cssPrefix+"Transform"]="none",this.hscrollBar.style[a.feat.cssPrefix+"Transition"]="none",this.hscrollBar.style[a.feat.cssPrefix+"Perspective"]="none",this.hscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]= +"visible")}};g.prototype.stopFormsMode=function(){if(!this.blockFormsFix){var b=this.getCSSMatrix(this.el);this.refresh=this.refreshSafeKeep;this.androidFormsMode=!1;this.el.style[a.feat.cssPrefix+"Perspective"]=1E3;this.el.style.marginTop=0;this.el.style.marginLeft=0;this.el.style[a.feat.cssPrefix+"Transition"]="0ms linear";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[a.feat.cssPrefix+"Perspective"]=1E3;this.container.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden"; +this.vscrollBar&&(this.vscrollBar.style[a.feat.cssPrefix+"Perspective"]=1E3,this.vscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden");this.hscrollBar&&(this.hscrollBar.style[a.feat.cssPrefix+"Perspective"]=1E3,this.hscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden")}};g.prototype.scrollerMoveCSS=function(b,d,e){d||(d=0);e||(e="linear");d=numOnly(d);var f=this;this.el&&this.el.style&&(this.eventsActive&&(this.androidFormsMode?(this.el.style.marginTop=Math.round(b.y)+"px", +this.el.style.marginLeft=Math.round(b.x)+"px"):(d={x:b.x,y:b.y,duration:d,easing:"easeOutSine"},f.initScrollProgress&&(d.update=function(b){a.trigger(f,"scroll",[b]);a.trigger(a.touchLayer,"scroll",[b])}),a(this.el).animateCss(d).start())),this.logPos(b.x,b.y))};g.prototype.logPos=function(a,b){var e;e=this.elementInfo?{h:this.elementInfo.bottomMargin,w:this.elementInfo.rightMargin}:this.getViewportSize();this.loggedPcentX=this.divide(a,this.el.clientWidth-e.w);this.loggedPcentY=this.divide(b,this.el.clientHeight- +e.h);this.scrollTop=b;this.scrollLeft=a};g.prototype.scrollbarMoveCSS=function(b,d,e,f){e||(e=0);b&&b.style&&(this.androidFormsMode?(b.style.marginTop=Math.round(d.y)+"px",b.style.marginLeft=Math.round(d.x)+"px"):a(b).animateCss({x:d.x,y:d.y,duration:e,easing:"easeOutSine"}).start())};g.prototype.scrollTo=function(a,b){b||(b=0);this.scrollerMoveCSS(a,b)};g.prototype.scrollBy=function(a,b){var e=this.getCSSMatrix(this.el),f=numOnly(e.f),e=numOnly(e.e);this.scrollTo({y:f-a.y,x:e-a.x},b)};g.prototype.scrollToBottom= +function(a){this.scrollTo({y:-1*(this.el.clientHeight-this.container.clientHeight),x:0},a)};g.prototype.scrollToTop=function(a){this.scrollTo({x:0,y:0},a)};return function(c,d){var p;if(!k&&a.touchLayer&&a.isObject(a.touchLayer))n();else if(!a.touchLayer||!a.isObject(a.touchLayer))a.touchLayer={};if(p="string"===typeof c||c instanceof String?document.getElementById(c):c){var f=a(p);d.hasParent&&(f=f.parent());f.hasClass("x-scroll")&&(d.horizontalScroll=!0);f.hasClass("y-scroll")&&(d.verticalScroll= +!0);return a.os.desktop?new e(p,d):d.useJsScroll?new g(p,d):new b(p,d)}window.alert("Could not find element for scroller "+c)}}()})(af); +(function(a){function n(f,h,g){!0===g&&(this.getAttribute("multiple")||a.selectBox.updateMaskValue(this.parentNode.id,this.text,this.value),this.parentNode.value=this.value);return g}function l(f,h,g){this.options[g]&&(this.getAttribute("multiple")||a.selectBox.updateMaskValue(this.linker,this.options[g].value,this.options[g].text),this.value=this.options[g].value);return g}function k(f){var h=f.target;a(h.linker).remove();delete h.linker;f.stopPropagation()}a.selectBox={scroller:null,currLinker:null, +getOldSelects:function(f){if(a.os.android&&!a.os.androidICS)if(a.fn.scroller){var h=f&&document.getElementById(f)?document.getElementById(f):document;if(h){f=h.getElementsByTagName("select");for(h=0;h");for(var g=g.find("ul"),b=0;b=d&&(f=(h-1)*-c);this.scroller.scrollTo({x:0,y:f})}}catch(p){console.log("error init dropdown"+p)}h="block"===a("#afSelectClose").css("display")?numOnly(a("#afSelectClose").height()): +0;a("#afSelectWrapper").height(numOnly(a("#afSelectBoxContainer").height())-h+"px")}},updateMaskValue:function(f,h,g){a(f).html(g)},setDropDownValue:function(f,h){if(f){var g=a(f);h=parseInt(h,10);isNaN(h)||(f.getAttribute("multiple")?(g=a("#afSelectBoxfix li:nth-child("+(h+1)+")"),g.hasClass("selected")?g.removeClass("selected"):g.addClass("selected")):(f.selectedIndex=h,g.find("option").prop("selected",!1),g.find("option:nth-child("+(h+1)+")").prop("selected",!0),this.scroller.scrollTo({x:0,y:0}), +this.hideDropDown()),a(f).trigger("change"))}},hideDropDown:function(){a("#afModalMask").hide();a("#afSelectBoxfix").html("")},createHtml:function(){var f=this;document.getElementById("afSelectBoxfix")||a(document).ready(function(){a(document).on("click",".afFakeSelect",function(){this.linker.disabled||(f.currLinker=this,"multiple"===this.linker.getAttribute("multiple")?a("#afSelectClose").show():a("#afSelectClose").hide(),f.initDropDown(this.linker))});var h=a.create("div",{id:"afSelectBoxContainer"}), +g=a.create("div",{id:"afSelectBoxfix"}),b=a.create("div",{id:"afSelectWrapper"});b.css("position","relative");b.append(g);var g=a.create("div",{id:"afSelectClose",html:"Done Cancel"}),e=a.create("div",{id:"afModalMask"}),c=a("#afui");h.prepend(g).append(b);e.append(h);0=f?0=h&&(k.el.trigger("longTap"),k={})}var k={},f,h=750,g;a(document).ready(function(){var b;a(document.body).bind("touchstart",function(e){e.originalEvent&&(e=e.originalEvent);if(e.touches&&0!==e.touches.length){var c=Date.now(),d=c-(k.last||c);e.touches&&0!==e.touches.length&&(k.el=a("tagName"in e.touches[0].target?e.touches[0].target:e.touches[0].target.parentNode), +f&&clearTimeout(f),k.x1=e.touches[0].pageX,k.y1=e.touches[0].pageY,k.x2=k.y2=0,0=d&&(k.isDoubleTap=!0),k.last=c,g=setTimeout(l,h),a.ui.useAutoPressed&&!k.el.data("ignore-pressed")&&k.el.addClass("pressed"),b&&(a.ui.useAutoPressed&&!b.data("ignore-pressed")&&b[0]!==k.el[0])&&b.removeClass("pressed"),b=k.el)}}).bind("touchmove",function(a){a.originalEvent&&(a=a.originalEvent);k.x2=a.touches[0].pageX;k.y2=a.touches[0].pageY;(3Math.abs(c.lastTouchStartX-a.clientX)&&2>Math.abs(c.lastTouchStartY-a.clientY))&&(a.preventDefault(),a.stopPropagation())},!0);a.bind(this,"scrollstart",function(b){c.isScrolling=!0;c.scrollingEl_=b;a.feat.nativeTouchScroll|| +(c.scrollerIsScrolling=!0);c.fireEvent("UIEvents","scrollstart",b,!1,!1)});a.bind(this,"scrollend",function(b){c.isScrolling=!1;a.feat.nativeTouchScroll||(c.scrollerIsScrolling=!1);c.fireEvent("UIEvents","scrollend",b,!1,!1)});this.hideAddressBar(0,1);this.launchFixUI(5)};c.prototype={dX:0,dY:0,cX:0,cY:0,touchStartX:null,touchStartY:null,layer:null,scrollingEl_:null,scrollTimeoutEl_:null,scrollTimeout_:null,reshapeTimeout_:null,scrollEndedProxy_:null,exitEditProxy_:null,launchFixUIProxy_:null,reHideAddressBarTimeout_:null, +retestAndFixUIProxy_:null,panElementId:"header",blockClicks:!1,allowDocumentScroll_:!1,ignoreNextResize_:!1,blockPossibleClick_:!1,isScrolling:!1,isScrollingVertical_:!1,wasPanning_:!1,isPanning_:!1,isFocused_:!1,justBlurred_:!1,requiresNativeTap:!1,holdingReshapeType_:null,trackingClick:!1,scrollerIsScrolling:!1,handleEvent:function(a){switch(a.type){case "touchstart":this.onTouchStart(a);break;case "touchmove":this.onTouchMove(a);break;case "touchend":this.onTouchEnd(a);break;case "click":this.onClick(a); +break;case "blur":this.onBlur(a);break;case "scroll":this.onScroll(a);break;case "orientationchange":this.onOrientationChange(a);break;case "resize":this.onResize(a);break;case "focusin":this.onFocusIn(a)}},launchFixUI:function(a){a||(a=2);if(null===this.reHideAddressBarTimeout_)return this.testAndFixUI(0,a)},resetFixUI:function(){this.reHideAddressBarTimeout_&&clearTimeout(this.reHideAddressBarTimeout_);this.reHideAddressBarTimeout_=null},testAndFixUI:function(b,c){var e=this.getReferenceHeight(), +f=this.getCurrentHeight();if(e!==f&&!(0.97*f=c)this.resetFixUI();else if(a.os.ios7)window.scrollTo(1,1);else if(a.os.desktop||a.os.kindle)this.layer.style.height="100%";else if(a.os.android){window.scrollTo(1,1);this.layer.style.height=this.isFocused_||window.innerHeight>=window.outerHeight?window.innerHeight+"px":window.outerHeight+"px";var e=b+1;this.reHideAddressBarTimeout_= +setTimeout(this.retestAndFixUIProxy_,250*e,e,c)}else this.isFocused_||(document.documentElement.style.height="5000px",window.scrollTo(0,0),document.documentElement.style.height=window.innerHeight+"px",this.layer.style.height=window.innerHeight+"px")},getReferenceHeight:function(){return window.innerHeight},getCurrentHeight:function(){return a.os.android?window.innerHeight:numOnly(document.documentElement.style.height)},onOrientationChange:function(){this.focusedElement&&this.focusedElement.blur(); +!this.holdingReshapeType_&&this.reshapeTimeout_?this.fireReshapeEvent("orientationchange"):this.previewReshapeEvent("orientationchange");a.os.android&&a.os.chrome&&(this.layer.style.height="100%")},onResize:function(){this.ignoreNextResize_?this.ignoreNextResize_=!1:this.launchFixUI()&&this.reshapeAction()},onClick:function(b){var c=b.target&&void 0!==b.target.tagName?b.target.tagName.toLowerCase():"";if(-1!==n.indexOf(c)&&(!this.isFocused_||b.target!==this.focusedElement)){c=b.target&&void 0!==b.target.type? +b.target.type.toLowerCase():"";if(-1===l.indexOf(c)){this.isFocused_&&this.focusedElement.removeEventListener("blur",this,!1);this.focusedElement=b.target;this.focusedElement.addEventListener("blur",this,!1);if(!this.isFocused_&&!this.justBlurred_)if(a.trigger(this,"enter-edit",[b.target]),a.os.ios){var e=this;setTimeout(function(){e.fireReshapeEvent("enter-edit")},300)}else this.previewReshapeEvent("enter-edit");this.isFocused_=!0}else this.isFocused_=!1;this.justBlurred_=!1;this.allowDocumentScroll_= +!0;k&&b.target.focus()}else a.os.blackberry10&&this.isFocused_&&this.focusedElement.blur()},previewReshapeEvent:function(a){var b=this;this.reshapeTimeout_=setTimeout(function(){b.fireReshapeEvent(a);b.reshapeTimeout_=null;b.holdingReshapeType_=null},750);this.holdingReshapeType_=a},fireReshapeEvent:function(b){a.trigger(this,"reshape");a.trigger(this,b?b+"-reshape":"unknown-reshape")},reshapeAction:function(){this.reshapeTimeout_?(clearTimeout(this.reshapeTimeout_),this.fireReshapeEvent(this.holdingReshapeType_), +this.reshapeTimeout_=this.holdingReshapeType_=null):this.previewReshapeEvent()},onFocusIn:function(a){if(!this.isFocused_)this.onClick(a)},onBlur:function(b){a.os.android&&b.target===window||(this.isFocused_=!1,this.focusedElement&&this.focusedElement.removeEventListener("blur",this,!1),this.focusedElement=null,this.justBlurred_=!0,a.asap(this.exitEditProxy_,this,[b.target]))},exitExit:function(b){this.justBlurred_=!1;if(!this.isFocused_)if(a.trigger(this,"exit-edit",[b]),this.allowDocumentScroll_= +!1,a.os.ios){var c=this;setTimeout(function(){c.fireReshapeEvent("exit-edit")},300)}else this.previewReshapeEvent("exit-edit")},onScroll:function(a){!this.allowDocumentScroll_&&(!this.isPanning_&&a.target===document)&&(this.allowDocumentScroll_=!0,this.wasPanning_?(this.wasPanning_=!1,setTimeout(this.launchFixUIProxy_,2E3,[2])):this.launchFixUI())},onTouchStart:function(d){this.dX=d.touches[0].pageX;this.dY=d.touches[0].pageY;this.lastTimestamp=d.timeStamp;this.lastTouchStartX=this.lastTouchStartY= +null;if(a.os.ios){if(b===d.touches[0].identifier)return e=!0,d.preventDefault(),b=!1;b=d.touches[0].identifier;e=!1}if(this.scrollerIsScrolling)return this.moved=!0,this.scrollerIsScrolling=!1,d.preventDefault(),!1;this.trackingClick=!0;(g||a.feat.nativeTouchScroll)&&this.checkDOMTree(d.target,this.layer);this.isScrolling&&(null!==this.scrollTimeout_?(clearTimeout(this.scrollTimeout_),this.scrollTimeout_=null,this.scrollTimeoutEl_!==this.scrollingEl_?this.scrollEnded(!1):this.blockPossibleClick_= +!0):(this.scrollEnded(!0),this.blockPossibleClick_=!1));if(a.os.android&&d&&d.target&&d.target.getAttribute&&"ignore"===d.target.getAttribute("data-touchlayer")||this.isFocused_&&!a.os.blackberry10)this.allowDocumentScroll_=this.requiresNativeTap=!0;else if(h&&d.target&&void 0!==d.target.tagName){var c=d.target.tagName.toLowerCase();-1!==n.indexOf(c)&&(this.requiresNativeTap=!0)}else d.target&&(void 0!==d.target.tagName&&"input"===d.target.tagName.toLowerCase()&&"range"===d.target.type)&&(this.requiresNativeTap= +!0);!a.os.chrome&&(!a.os.fennec&&!a.os.androidICS)&&(!this.isPanning_&&!this.requiresNativeTap?(this.isScrolling&&!a.feat.nativeTouchScroll||!this.isScrolling)&&d.preventDefault():this.isScrollingVertical_&&this.demandVerticalScroll())},demandVerticalScroll:function(){0>=this.scrollingEl_.scrollTop?this.scrollingEl_.scrollTop=1:this.scrollingEl_.scrollTop+this.scrollingEl_.clientHeight>=this.scrollingEl_.scrollHeight&&(this.scrollingEl_.scrollTop=this.scrollingEl_.scrollHeight-this.scrollingEl_.clientHeight- +1)},ignoreScrolling:function(a){return void 0===a.scrollWidth||void 0===a.clientWidth||void 0===a.scrollHeight||void 0===a.clientHeight?!0:!1},allowsVerticalScroll:function(a,b){var c=b.overflowY;return"scroll"===c||"auto"===c&&a.scrollHeight>a.clientHeight?!0:!1},allowsHorizontalScroll:function(a,b){var c=b.overflowX;return"scroll"===c||"auto"===c&&a.scrollWidth>a.clientWidth?!0:!1},checkDOMTree:function(b,c){if(g&&this.panElementId===b.id)this.isPanning_=!0;else{if(a.feat.nativeTouchScroll){if(this.ignoreScrolling(b))return; +var e=window.getComputedStyle(b);if(this.allowsVerticalScroll(b,e)){this.isScrollingVertical_=!0;this.scrollingEl_=b;this.isScrolling=!0;return}this.allowsHorizontalScroll(b,e)&&(this.isScrollingVertical_=!1,this.scrollingEl_=null,this.isScrolling=!0)}b!==c&&b.parentNode&&this.checkDOMTree(b.parentNode,c)}},scrollEnded:function(a){null!==this.scrollTimeoutEl_&&(a&&this.scrollTimeoutEl_.removeEventListener("scroll",this.scrollEndedProxy_,!1),this.fireEvent("UIEvents","scrollend",this.scrollTimeoutEl_, +!1,!1),this.scrollTimeoutEl_=null)},onTouchMove:function(b){var c=this.moved;this.moved=!0;f&&(this.cY=b.touches[0].pageY-this.dY,this.cX=b.touches[0].pageX-this.dX);this.isPanning_||(this.isScrolling&&(c||this.fireEvent("UIEvents","scrollstart",this.scrollingEl_,!1,!1),this.speedY=(this.lastY-b.touches[0].pageY)/(b.timeStamp-this.lastTimestamp),this.lastY=b.touches[0].pageY,this.lastX=b.touches[0].pageX,this.lastTimestamp=b.timeStamp),!a.os.blackberry10&&!this.requiresNativeTap&&(!this.isScrolling|| +!a.feat.nativeTouchScroll&&!this.requiresNativeTap)&&b.preventDefault())},onTouchEnd:function(b){var c=this.moved;f&&(c=c&&!(10>Math.abs(this.cX)&&10>Math.abs(this.cY)));if(!a.os.ios||!this.requiresNativeTap)this.allowDocumentScroll_=!1;if(this.isPanning_&&c)this.wasPanning_=!0;else if(!c&&!this.requiresNativeTap){this.scrollerIsScrolling=!1;if(!this.trackingClick)return;b.preventDefault();if(!this.blockClicks&&!this.blockPossibleClick_){var c=b.target,e=b.changedTouches?b.changedTouches[0]:b.touches[0]; +3===c.nodeType&&(c=c.parentNode);this.fireEvent("Event","click",c,!0,b.mouseToTouch,e[0]);this.lastTouchStartX=this.dX;this.lastTouchStartY=this.dY}}else c&&(this.isScrolling&&(this.scrollTimeoutEl_=this.scrollingEl_,0.01>Math.abs(this.speedY)?this.scrollEnded(!1):this.scrollTimeout_=setTimeout(this.scrollTimeoutExpireProxy_,30)),this.requiresNativeTap&&(this.isFocused_||a.trigger(this,"cancel-enter-edit",[b.target])));a.os.blackberry10&&(this.lastTouchStartX=this.dX,this.lastTouchStartY=this.dY); +this.clearTouchVars()},clearTouchVars:function(){this.speedY=this.lastY=this.cY=this.cX=this.dX=this.dY=0;this.trackingClick=this.blockPossibleClick_=this.requiresNativeTap=this.isScrollingVertical_=this.isScrolling=this.isPanning_=this.moved=!1},fireEvent:function(b,c,e,f,h,g){var k=document.createEvent(b);k.initEvent(c,f,!0);g&&a.each(g,function(a,b){k.key=b});h&&(k.mouseToTouch=!0);e.dispatchEvent(k)}}})(af); +(function(a){a.fn.popup=function(a){return new l(this[0],a)};var n=[],l=function(){var f=function(f,g){if(this.container="string"===typeof f||f instanceof String?document.getElementById(f):f)try{if("string"===typeof g||"number"===typeof g)g={message:g,cancelOnly:"true",cancelText:"OK"};this.id=g.id=g.id||a.uuid();this.addCssClass=g.addCssClass?g.addCssClass:"";this.suppressTitle=g.suppressTitle||this.suppressTitle;this.title=g.suppressTitle?"":g.title||"Alert";this.message=g.message||"";this.cancelText= +g.cancelText||"Cancel";this.cancelCallback=g.cancelCallback||function(){};this.cancelClass=g.cancelClass||"button";this.doneText=g.doneText||"Done";this.doneCallback=g.doneCallback||function(){};this.doneClass=g.doneClass||"button";this.cancelOnly=g.cancelOnly||!1;this.onShow=g.onShow||function(){};this.autoCloseDone=void 0!==g.autoCloseDone?g.autoCloseDone:!0;n.push(this);1===n.length&&this.show()}catch(b){console.log("error adding popup "+b)}else window.alert("Error finding container for popup "+ +f)};f.prototype={id:null,addCssClass:null,title:null,message:null,cancelText:null,cancelCallback:null,cancelClass:null,doneText:null,doneCallback:null,doneClass:null,cancelOnly:!1,onShow:null,autoCloseDone:!0,suppressTitle:!1,show:function(){var f=this,g="";a(this.container).append(a(g));var b=a.query("#"+this.id);b.bind("close",function(){f.hide()});this.cancelOnly&&(b.find("A#action").hide(),b.find("A#cancel").addClass("center"));b.find("A").each(function(){var b=a(this);b.bind("click",function(a){"cancel"===b.attr("id")?(f.cancelCallback.call(f.cancelCallback,f),f.hide()):(f.doneCallback.call(f.doneCallback,f),f.autoCloseDone&&f.hide());a.preventDefault()})}); +f.positionPopup();a.blockUI(0.5);b.bind("orientationchange",function(){f.positionPopup()});b.find("header").show();b.find("footer").show();setTimeout(function(){b.removeClass("hidden").addClass("show");f.onShow(f)},50)},hide:function(){var f=this;a.query("#"+f.id).addClass("hidden");a.unblockUI();!a.os.ie&&!a.os.android?setTimeout(function(){f.remove()},250):f.remove()},remove:function(){var f=a.query("#"+this.id);f.unbind("close");f.find("BUTTON#action").unbind("click");f.find("BUTTON#cancel").unbind("click"); +f.unbind("orientationchange").remove();n.splice(0,1);0")),a.query("BODY DIV#mask").bind("touchstart",function(a){a.preventDefault()}),a.query("BODY DIV#mask").bind("touchmove", +function(a){a.preventDefault()}),k=!0)};a.unblockUI=function(){k=!1;a.query("BODY DIV#mask").unbind("touchstart");a.query("BODY DIV#mask").unbind("touchmove");a("BODY DIV#mask").remove()}})(af); +(function(a){var n=window.location.pathname+window.location.search,l=window.location.hash,k=l,f=function(){function b(){e.useOSThemes&&(a("#afui").removeClass("ios ios7 win8 tizen bb android light dark firefox"),a.os.android?a("#afui").addClass("android"):a.os.ie?a("#afui").addClass("win8"):a.os.blackberry||a.os.blackberry10||a.os.playbook?(a("#afui").addClass("bb"),e.backButtonText="Back"):a.os.ios7?a("#afui").addClass("ios7"):a.os.ios?a("#afui").addClass("ios"):a.os.tizen?a("#afui").addClass("tizen"): +a.os.fennec&&(a("#afui").addClass("firefox"),e.animateHeaders=!1));if(a.os.ios){a("head").find("#iosBlurrHack").remove();var b;b="-webkit-backface-visibility: hidden;-webkit-perspective:1000;";a("head").append("")}else a.os.android&&!a.os.androidICS?e.transitionTime="150ms":a.os.fennec&&e.ready(function(){window.addEventListener("deviceorientation",function(){var b=numOnly(a("#header").css("height"))+numOnly(a("#navbar").css("height")); +a("#content").css("height",window.innerHeight-b)})});a.os.ios7&&a("#afui").hasClass("ios7")&&e.overlayStatusbar&&(e.ready(function(){a("#afui").addClass("overlayStatusbar")}),a(document.body).css("background","rgb(249,249,249)"))}var e=this;this.availableTransitions={};this.availableTransitions["default"]=this.availableTransitions.none=this.noTransition;if("function"===typeof define&&define.amd||"undefined"!==typeof module&&module.exports)e.autoLaunch=!1;var c=function(){var c=document.getElementById("afui"); +if(null===c){c=document.createElement("div");c.id="afui";for(var f=document.body;f&&f.firstChild;)c.appendChild(f.firstChild);a(document.body).prepend(c)}e.isIntel="intel"in window&&window.intel&&window.intel.xdk&&"app"in window.intel.xdk;a.os.supportsTouch&&a.touchLayer(c);b()};if("complete"===document.readyState||"loaded"===document.readyState)if(c(),e.init)e.autoBoot();else a(window).one("afui:init",function(){e.autoBoot()});else a(document).ready(function(){c();if(e.init)e.autoBoot();else a(window).one("afui:init", +function(){e.autoBoot()})},!1);"intel"in window||(window.intel={xdk:{}},window.intel.xdk.webRoot="");window.addEventListener("popstate",function(){if(e.useInternalRouting){var a=e.getPanelId(document.location.hash);"#"!==document.location.href.replace(document.location.origin+"/","")&&(""===a&&1===e.history.length&&(a="#"+e.firstDiv.id),""!==a&&0!==af(a).filter(".panel").length&&a!=="#"+e.activeDiv.id&&e.goBack())}},!1)};f.prototype={init:!1,transitionTime:"230ms",showLoading:!0,loadingText:"Loading Content", +loadContentQueue:[],isIntel:!1,titlebar:"",navbar:"",header:"",viewportContainer:"",remotePages:{},history:[],homeDiv:"",screenWidth:"",content:"",modalWindow:"",customFooter:!1,defaultFooter:"",defaultHeader:null,customMenu:!1,customAside:!1,defaultAside:"",defaultMenu:"",_readyFunc:null,doingTransition:!1,passwordBox:a.passwordBox?new a.passwordBox:!1,selectBox:a.selectBox?a.selectBox:!1,ajaxUrl:"",transitionType:"slide",scrollingDivs:{},firstDiv:"",hasLaunched:!1,isLaunching:!1,launchCompleted:!1, +activeDiv:"",customClickHandler:"",menuAnimation:null,togglingSideMenu:!1,sideMenuWidth:"200px",handheldMinWidth:"768",trimBackButtonText:!0,useOSThemes:!0,overlayStatusbar:!1,lockPageBounce:!0,animateHeaders:!0,useAutoPressed:!0,horizontalScroll:!1,_currentHeaderID:"defaultHeader",useInternalRouting:!0,autoBoot:function(){this.hasLaunched=!0;var a=this;if(this.autoLaunch)if(this.isIntel){var e=function(){a.launch();document.removeEventListener("intel.xdk.device.ready",e)};document.addEventListener("intel.xdk.device.ready", +e)}else this.launch()},css3animate:function(b,e){b=a(b);return b.css3Animate(e)},dispatchPanelEvent:function(a,e){if("string"===typeof a&&window[a])return window[a](e);if(-1!==a.indexOf(".")){var c=window,d=a.split("."),f=d.length,g=0;for(g;g #navbar.hasMenu.splitview, #afui > #header.hasMenu.splitview, #afui > #content.hasMenu.splitview { margin-left:"+ +b+" !important; width: "+e+"px !important;}}#afui #menu {width:"+b+" !important}";a("head").append("")},setSideMenuWidth:function(){this.setLeftSideMenuWidth.apply(this,arguments)},setRightSideMenuWidth:function(b){this.sideMenuWidth=b;b=(b+"").replace("px","")+"px";a("head").find("style#afui_asideMenuWidth").remove();a("head").append("")},disableNativeScrolling:function(){a.feat.nativeTouchScroll= +!1},manageHistory:!0,loadDefaultHash:!0,useAjaxCacheBuster:!1,actionsheet:function(b){return a.query("#afui").actionsheet(b)},popup:function(b){return a.query("#afui").popup(b)},blockUI:function(b){a.blockUI(b)},unblockUI:function(){a.unblockUI()},removeFooterMenu:function(){a.query("#navbar").hide();this.showNavMenu=!1},showNavMenu:!0,autoLaunch:!0,showBackbutton:!0,showBackButton:!0,backButtonText:"",resetScrollers:!1,ready:function(b){if(this.launchCompleted)b();else a(document).one("afui:ready", +function(){b()})},setBackButtonStyle:function(b){a.query("#header .backButton").get(0).className=b},goBack:function(a){if(a=Math.min(Math.abs(~~a||1),this.history.length))a=this.history.splice(-a).shift(),this.loadContent(a.target+"",0,1,a.transition),this.transitionType=a.transition,this.updateHash(a.target)},clearHistory:function(){this.history=[];this.setBackButtonVisibility(!1)},pushHistory:function(b,e,c,d){this.history.push({target:b,transition:c});try{this.manageHistory&&(window.history.pushState(e, +e,n+"#"+e+d),a(window).trigger("hashchange",null,{newUrl:n+"#"+e+d,oldUrl:n+b}))}catch(f){}},updateHash:function(b){if(this.manageHistory){k=b=-1===b.indexOf("#")?"#"+b:b;var e=window.location.hash,c=this.getPanelId(b).substring(1);try{window.history.replaceState(c,c,n+b),a(window).trigger("hashchange",null,{newUrl:n+b,oldUrl:n+e})}catch(d){}}},getPanelId:function(a){var e=a.indexOf("/");return-1===e?a:a.substring(0,e)},updateBadge:function(b,e,c,d){void 0===c&&(c="");b=a(b);var f=b.find("span.af-badge"); +0===f.length?("absolute"!==b.css("position")&&b.css("position","relative"),f=a.create("span",{className:"af-badge "+c,html:e}),b.append(f)):f.html(e);f.removeClass("tl bl br tr");f.addClass(c);void 0===d&&(d="red");a.isObject(d)?f.css(d):d&&f.css("background",d);f.data("ignore-pressed","true")},removeBadge:function(b){a(b).find("span.af-badge").remove()},toggleNavMenu:function(b){this.showNavMenu&&("none"!==a.query("#navbar").css("display")&&(void 0!==b&&!0!==b||void 0===b)?a.query("#navbar").hide(): +(void 0===b||void 0!==b&&!0===b)&&a.query("#navbar").show())},toggleHeaderMenu:function(b){"none"!==a.query("#header").css("display")&&(void 0!==b&&!0!==b||void 0===b)?a.query("#header").hide():(void 0===b||void 0!==b&&!0===b)&&a.query("#header").show()},toggleAsideMenu:function(){this.toggleRightSideMenu.apply(this,arguments)},toggleRightSideMenu:function(a,e,c){if(this.isAsideMenuEnabled())return this.toggleLeftSideMenu(a,e,c,!0)},toggleLeftSideMenu:function(b,e,c,d){if(!(!this.isSideMenuEnabled()&& +!this.isAsideMenuEnabled()||this.togglingSideMenu))if(d||this.isSideMenuEnabled())if(d||!(a.ui.splitview&&window.innerWidth>=a.ui.handheldMinWidth)){var f=this,g=a.query("#menu"),h=a.query("#aside_menu"),k=a.query("#content, #header, #navbar"),l=a.query(".afui_panel_mask");c=c||this.transitionTime;var n=this.isSideMenuOn(),z=d?"-"+numOnly(h.css("width")):numOnly(g.css("width"));0===l.length&&window.innerWidth"),l=a.query(".afui_panel_mask"), +a(".afui_panel_mask").bind("click",function(){a.ui.toggleSideMenu(!1,null,null,d)}));var s=this.getSideMenuPosition();n&&!d&&0>s?n=!1:n&&(d&&0 footer > a:not(.button)");0h1").html(b);a.query("#afui_mask").show()},hideMask:function(){a.query("#afui_mask").hide()},modalReference_:null,showModal:function(b,e){this.modalTransition=e||"up";var c=a.query("#modalContainer");"string"===typeof b&& +(b="#"+b.replace("#",""));var d=a.query(b);this.modalReference_=d;var f=a.query("#afui_modal");if(d.length){var g=this.scrollingDivs.hasOwnProperty(d.attr("id")),h;a.feat.nativeTouchScroll||a.os.desktop||!g?(h=d.contents(),c.append(h)):(h=a(d.get(0).childNodes[0]).contents(),c.children().eq(0).append(h));this.runTransition(this.modalTransition,this.modalTransContainer,this.modalWindow,!1);a(this.modalWindow).css("display","");a(this.modalWindow).addClass("display","flexContainer");g?this.scrollingDivs.modal_container.enable(this.resetScrollers): +this.scrollingDivs.modal_container.disable();c.addClass("panel").show();"none"===d.data("header")?f.find("#modalHeader").hide():0 footer > a:not(.button)");0footer>a:not(.button)").removeClass("pressed"),a.query("#navbar #"+b.getAttribute("data-tab")).addClass("pressed"));(c=b.getAttribute("data-left-menu")||b.getAttribute("data-nav"))&&this.customMenu!==c?(this.customMenu=c,this.updateSideMenuElements(c)):c!== +this.customMenu&&(this.customMenu&&this.updateSideMenuElements(this.defaultMenu),this.customMenu=!1);(c=b.getAttribute("data-right-menu")||b.getAttribute("data-aside"))&&this.customAside!==c?(this.customAside=c,this.updateAsideElements(c)):c!==this.customAside&&(this.customAside&&this.updateAsideElements(this.defaultAside),this.customAside=!1);e&&((c=e.getAttribute("data-unload"))&&this.dispatchPanelEvent(c,e),a(e).trigger("unloadpanel"));(c=b.getAttribute("data-load"))&&this.dispatchPanelEvent(c, +b);a(b).trigger("loadpanel");this.isSideMenuOn()&&this.toggleSideMenu(!1)},parseScriptTags:function(b){b&&a.fn&&"appframework"===a.fn.namespace&&a.parseJS(b)},loadContent:function(b,e,c,d,f){if(this.doingTransition)this.loadContentQueue.push([b,e,c,d,f]);else if(0!==b.length){var h=!0;f=f||document.createElement("a");if(-1===b.indexOf("#")){var k="url"+g(b),l=a.query("div.panel[data-crc='"+k+"']");0d.bottom&&f.height"}).get(0),this.viewportContainer.append(this.menu),this.menu.style.overflow="hidden",this.scrollingDivs.menu_scroller=a.query("#menu_scroller").scroller({scrollBars:!0,verticalScroll:!0,vScrollCSS:"afScrollbar",useJsScroll:!a.feat.nativeTouchScroll,autoEnable:!0,lockBounce:this.lockPageBounce,hasParent:!0}),a.feat.nativeTouchScroll&&a.query("#menu_scroller").css("height", +"100%"),this.asideMenu=a.create("div",{id:"aside_menu",html:"
"}).get(0),this.viewportContainer.append(this.asideMenu),this.asideMenu.style.overflow="hidden",this.scrollingDivs.aside_menu_scroller=a.query("#aside_menu_scroller").scroller({scrollBars:!0,verticalScroll:!0,vScrollCSS:"afScrollbar",useJsScroll:!a.feat.nativeTouchScroll,autoEnable:!0,lockBounce:this.lockPageBounce,hasParent:!0}),a.feat.nativeTouchScroll&&a.query("#aside_menu_scroller").css("height","100%")); +a(this.header).html("

"+this.header.innerHTML);this.backButton=a.query("#header .backButton").css("visibility","hidden");a(document).on("click","#header .backButton",function(a){a.preventDefault();b.goBack()});this.titlebar=a.query("#header #pageTitle").get(0);this.addContentDiv("afui_ajax","");var c=a.create("div",{id:"afui_mask",className:"ui-loader",html:"

Loading Content

"}).css({"z-index":2E4, +display:"none"});document.body.appendChild(c.get(0));c=a.create("div",{id:"afui_modal"}).get(0);a(c).hide();c.appendChild(a.create("div",{id:"modalHeader",className:"header"}).get(0));c.appendChild(a.create("div",{id:"modalContainer"}).get(0));c.appendChild(a.create("div",{id:"modalFooter",className:"footer"}).get(0));this.modalTransContainer=a.create("div",{id:"modalTransContainer"}).appendTo(c).get(0);this.viewportContainer.append(c);this.scrollingDivs.modal_container=a.query("#modalContainer").scroller({scrollBars:!0, +vertical:!0,vScrollCSS:"afScrollbar",lockBounce:this.lockPageBounce});this.modalWindow=c;for(var d={},c=this.viewportContainer.get(0).querySelectorAll(".panel"),f=0;f=F&&(u=!1,a(document).trigger("defer:loaded"))},error:function(){console.log("Error with deferred load "+intel.xdk.webRoot+d[c]);z++;z>=F&&(u=!1,a(document).trigger("defer:loaded"))}})};if(0a:not(.button)",function(b){a.query("#navbar>footer>a").not(b.currentTarget).removeClass("pressed");a(b.currentTarget).addClass("pressed")});0parseInt(a.ui.handheldMinWidth,10)&&(a.ui.sideMenuWidth=a("#menu").css("width")+ +"px");var c=b.getPanelId(l),d=null!==c&&c==="#"+b.firstDiv.id;0=e.clientY&&"h1"===e.target.nodeName.toLowerCase()&&a.scrollingDivs[a.activeDiv.id].scrollToTop("100")})},blockPageScroll:function(){a.query("#afui #header").bind("touchmove",function(a){a.preventDefault()})},noTransition:function(a,e){e.style.display="block";a.style.display="block";this.clearAnimations(e);this.css3animate(a,{x:"0%",y:0});this.finishTransition(a);e.style.zIndex=2;a.style.zIndex=1},finishTransition:function(b,e){b.style.display="none";this.doingTransition=!1;b&&a(b).trigger("unloadpanelcomplete"); +e&&a(e).trigger("loadpanelcomplete");e&&this.clearAnimations(e);b&&this.clearAnimations(b);a.trigger(this,"content-loaded")},clearAnimations:function(b){b.style[a.feat.cssPrefix+"Transform"]="none";b.style[a.feat.cssPrefix+"Transition"]="none"}};var h=function(b,e){var c=document.getElementById("afui");if(e!==c){if("a"!==e.tagName.toLowerCase()&&e.parentNode)return h(b,e.parentNode);if("undefined"!==e.tagName&&"a"===e.tagName.toLowerCase()){if(!1!==("function"===typeof a.ui.customClickHandler?a.ui.customClickHandler: +!1)&&a.ui.customClickHandler(e,b))return b.preventDefault();if(!(-1!==e.href.toLowerCase().indexOf("javascript:")||e.getAttribute("data-ignore")))if(-1===e.hash.indexOf("#")&&0>>8^c;return(e^-1)>>>0};a.ui=new f;a.ui.init=!0;a(window).trigger("afui:preinit");a(window).trigger("afui:init")})(af); +(function(a){var n=function(){a.ui.isIntel=!0;setTimeout(function(){document.getElementById("afui").style.height="100%";document.body.style.height="100%";document.documentElement.style.minHeight=window.innerHeight},30);document.removeEventListener("intel.xdk.device.ready",n)};document.addEventListener("intel.xdk.device.ready",n);a.feat.nativeTouchScroll&&document.addEventListener("orientationchange",function(){if(a.ui.scrollingDivs[a.ui.activeDiv.id]){var l=a.ui.scrollingDivs[a.ui.activeDiv.id];l&& +(0===l.el.scrollTop&&(l.disable(),setTimeout(function(){l.enable()},300)),l.refresh&&l.updateP2rHackPosition())}})})(af); +(function(a){a.availableTransitions.fade=function(n,l,k){var f=this;k?(l.style.zIndex=1,n.style.zIndex=2,f.clearAnimations(l),f.css3animate(n,{x:"0%",time:a.transitionTime,opacity:0.1,complete:function(a){a?f.finishTransition(n,l):(f.css3animate(n,{x:"-100%",opacity:1,complete:function(){f.finishTransition(n)}}),l.style.zIndex=2,n.style.zIndex=1)}})):(n.style.zIndex=1,l.style.zIndex=2,l.style.opacity=0,f.css3animate(l,{x:"0%",opacity:0.1,complete:function(){f.css3animate(l,{x:"0%",time:a.transitionTime, +opacity:1,complete:function(a){a?f.finishTransition(n,l):(f.clearAnimations(l),f.css3animate(n,{x:"-100%",y:0,complete:function(){f.finishTransition(n)}}))}})}}))}})(af.ui); +(function(a){a.availableTransitions.flip=function(n,l,k){var f=this;k||(n.style.zIndex=1,l.style.zIndex=2);f.css3animate(l,{x:"100%",scale:0.8,rotateY:"180deg",complete:function(){f.css3animate(l,{x:"0%",scale:1,time:a.transitionTime,rotateY:"0deg",complete:function(){f.clearAnimations(l)}})}});f.css3animate(n,{x:"100%",time:a.transitionTime,scale:0.8,rotateY:"180deg",complete:function(){f.css3animate(n,{x:"-100%",opacity:1,scale:1,rotateY:"0deg",complete:function(){f.finishTransition(n)}});l.style.zIndex= +2;n.style.zIndex=1}})}})(af.ui); +(function(a){a.availableTransitions.pop=function(n,l,k){var f=this;k?(l.style.zIndex=1,n.style.zIndex=2,f.clearAnimations(l),f.css3animate(n,{x:"0%",time:a.transitionTime,opacity:0.1,scale:0.2,origin:"50% 50%",complete:function(a){a?f.finishTransition(n):(f.css3animate(n,{x:"-100%",opacity:1,complete:function(){f.finishTransition(n)}}),l.style.zIndex=2,n.style.zIndex=1)}})):(n.style.zIndex=1,l.style.zIndex=2,f.css3animate(l,{x:"0%",scale:0.2,origin:"50% 50%",opacity:0.1,time:"0ms",complete:function(){f.css3animate(l, +{x:"0%",time:a.transitionTime,scale:1,opacity:1,origin:"0% 0%",complete:function(a){a?f.finishTransition(n,l):(f.clearAnimations(l),f.css3animate(n,{x:"100%",y:0,complete:function(){f.finishTransition(n)}}))}})}}))}})(af.ui); +(function(a){function n(l,k,f){var h=this;f?h.css3animate(l,{x:"0%",y:"0%",complete:function(){h.css3animate(l,{x:"100%",time:a.transitionTime,complete:function(){h.finishTransition(l,k)}}).link(k,{x:"0%",time:a.transitionTime})}}).link(k,{x:"-100%",y:"0%"}):h.css3animate(l,{x:"0%",y:"0%",complete:function(){h.css3animate(l,{x:"-100%",time:a.transitionTime,complete:function(){h.finishTransition(l,k)}}).link(k,{x:"0%",time:a.transitionTime})}}).link(k,{x:"100%",y:"0%"})}a.availableTransitions.slide= +n;a.availableTransitions["default"]=n})(af.ui);(function(a){a.availableTransitions.down=function(n,l,k){var f=this;k?(n.style.zIndex=2,l.style.zIndex=1,f.css3animate(n,{y:"0%",x:"0%",complete:function(){f.css3animate(n,{y:"-100%",time:a.transitionTime,complete:function(){f.finishTransition(n,l)}})}})):(n.style.zIndex=1,l.style.zIndex=2,f.css3animate(l,{y:"-100%",x:"0%",time:"10ms",complete:function(){f.css3animate(l,{y:"0%",time:a.transitionTime,complete:function(){f.finishTransition(n,l)}})}}))}})(af.ui); +(function(a){a.availableTransitions.up=function(n,l,k){var f=this;k?(n.style.zIndex=2,l.style.zIndex=1,f.css3animate(n,{y:"0%",x:"0%",complete:function(){f.css3animate(n,{y:"100%",time:a.transitionTime,complete:function(){f.finishTransition(n,l)}})}})):(n.style.zIndex=1,l.style.zIndex=2,f.css3animate(l,{y:"100%",x:"0%",time:"10ms",complete:function(){f.css3animate(l,{y:"0%",time:a.transitionTime,complete:function(){f.finishTransition(n,l)}})}}))}})(af.ui); +(function(a){function n(){a.ui.isWin8=!0;a.os.ie&&a.ui.isSideMenuEnabled()&&a.ui.ready(function(){if(!a.ui.tilesLoaded){a.ui.tilesLoaded=!0;if(window.innerWidth>a.ui.handheldMinWidth)return!0;a.ui.slideSideMenu&&(a.ui.slideSideMenu=!1);a.query("#afui #navbar footer").append("\u2022\u2022\u2022");var l=a.query("#afui #navbar").find("a").not(".button");if(0\u2022\u2022\u2022")};a.ui.isSideMenuOn=function(){var f=0>parseInt(a.getCssMatrix(a("#navbar")).f,10)?!0:!1;return this.isSideMenuEnabled()&&f};a.ui.toggleRightSideMenu=function(f,g,b){if(this.isAsideMenuEnabled()&&!this.togglingAsideMenu){var e= +this,c=a("#menu"),d=a.query("#aside_menu"),k=a.query("#content, #header, #navbar"),l=a.query(".afui_panel_mask");b=b||this.transitionTime;var n="block"===a("#aside_menu").css("display"),y="-"+e.sideMenuWidth;0===l.length&&window.innerWidth"),l=a.query(".afui_panel_mask"),a(".afui_panel_mask").bind("click",function(){a.ui.toggleSideMenu(!1,null,null,!0)}));var u=this.getSideMenuPosition();n&&0= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; + }, + + isPlainObject: function( obj ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.constructor && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + // Support: Android < 4.0, iOS < 6 (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== strundefined && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, + doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", function() { + setDocument(); + }, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", function() { + setDocument(); + }); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowclip^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + len = this.length, + ret = [], + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter(function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * The ready event handler and self cleanup method + */ +function completed() { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + len ? fn( elems[0], key ) : emptyGet; +}; + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + /* jshint -W018 */ + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + +function Data() { + // Support: Android < 4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Math.random(); +} + +Data.uid = 1; +Data.accepts = jQuery.acceptData; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android < 4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( rnotwhite ) || [] ); + } + } + + i = name.length; + while ( i-- ) { + delete cache[ name[ i ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; +var data_priv = new Data(); + +var data_user = new Data(); + + + +/* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend({ + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.remove( elem, name ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.remove( elem, [ type + "queue", key ] ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + // Support: Windows Web Apps (WWA) + // `name` and `type` need .setAttribute for WWA + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE9-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +})(); +var strundefined = typeof undefined; + + + +support.focusinBubbles = "onfocusin" in window; + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome < 28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// Create "bubbling" focus and blur events +// Support: Firefox, Chrome, Safari +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + data_priv.remove( doc, fix ); + + } else { + data_priv.access( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +var + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE 9 + option: [ 1, "" ], + + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] + }; + +// Support: IE 9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: 1.x compatibility +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute("type"); + } + + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// Support: IE >= 9 +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Support: IE >= 9 + // Fix Cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; + }, + + cleanData: function( elems ) { + var data, elem, type, key, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( jQuery.acceptData( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each(function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + }); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because push.apply(_, arraylike) throws + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( "