diff --git a/LICENSE b/LICENSE
index 7a4a3ea2..6092a574 100644
--- a/LICENSE
+++ b/LICENSE
@@ -199,4 +199,228 @@
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
+ limitations under the License.
+
+ SUBCOMPONENTS
+
+ Apache Callback includes software components under different license terms.
+ Your use of these subcomponents is subject to the terms and conditions of
+ the following licenses.
+
+ For the framework/libs/junit-4.10.jar component:
+
+ Common Public License - v 1.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+ LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+ CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+ 1. DEFINITIONS
+
+ "Contribution" means:
+
+ a) in the case of the initial Contributor, the initial code and
+ documentation distributed under this Agreement, and
+ b) in the case of each subsequent Contributor:
+
+ i) changes to the Program, and
+
+ ii) additions to the Program;
+
+ where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are
+not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+ 2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and
+such derivative works, in source code and object code form.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under
+Licensed Patents to make, use, sell, offer to sell, import and otherwise
+transfer the Contribution of such Contributor, if any, in source code and
+object code form. This patent license shall apply to the combination of the
+Contribution and the Program if, at the time the Contribution is added by the
+Contributor, such addition of the Contribution causes such combination to be
+covered by the Licensed Patents. The patent license shall not apply to any
+other combinations which include the Contribution. No hardware per se is
+licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+licenses to its Contributions set forth herein, no assurances are provided by
+any Contributor that the Program does not infringe the patent or other
+intellectual property rights of any other entity. Each Contributor disclaims
+any liability to Recipient for claims brought by any other entity based on
+infringement of intellectual property rights or otherwise. As a condition to
+exercising the rights and licenses granted hereunder, each Recipient hereby
+assumes sole responsibility to secure any other intellectual property rights
+needed, if any. For example, if a third party patent license is required to
+allow Recipient to distribute the Program, it is Recipient's responsibility to
+acquire that license before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license
+set forth in this Agreement.
+
+ 3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+ i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose;
+
+ ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+ iii) states that any provisions which differ from this Agreement are
+offered by that Contributor alone and not by any other party; and
+
+ iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on
+or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+ b) a copy of this Agreement must be included with each copy of the
+Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each
+Recipient is solely responsible for determining the appropriateness of using
+and distributing the Program and assumes all risks associated with its exercise
+of rights under this Agreement, including but not limited to the risks and
+costs of program errors, compliance with applicable laws, damage to or loss of
+data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such
+Recipient under this Agreement shall terminate as of the date such litigation
+is filed. In addition, if Recipient institutes patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's rights
+granted under Section 2(b) shall terminate as of the date such litigation is
+filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue
+and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation.
diff --git a/VERSION b/VERSION
index 9c6d6293..d88d8e71 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.6.1
+1.7.0rc1
diff --git a/changelog b/changelog
index 0eafa220..68f6e488 100644
--- a/changelog
+++ b/changelog
@@ -1,6 +1,16 @@
ChangeLog
ios
-Shazron Abdullah (12):
+Ben Birch (2):
+ ios camera targetWidth/Height don't match the documentation Fixes CB-183 and CB-54
+ iOS camera targetWidth/Height don't match the documentation - changes per shazron
+
+Fil Maj (1):
+ [CB-511] Changed deviceproperties version to "cordova" property
+
+Shazron Abdullah (29):
+ Updated js for iOS only parameter cropToTargetSize (Camera.getPicture)
+ Fixed CB-483 - FileTransfer - unknown property attribute 'atomic' when building from source (Xcode 3 only)
+ Updated to cordova-js 1.6.1
Fixed CB-496 - Camera.getPicture - will always return FILE_URI even though DATA_URL specified
Fixed CB-497 - online and offline events are not being fired in 1.6.0
Fixed CB-501 - orientationchange event is not being fired in 1.6.0
@@ -13,37 +23,64 @@ Shazron Abdullah (12):
Added 1.6.1 availability constants
Fixed pause and resume event firing to use cordova channels onPause and onResume
Re-fix CB-347 - don't apply .plist fix if the key does not exist
+ Implemented CB-536 - Add new selector to CDVViewController to create a new CDVCordovaView, so subclasses can override it
+ Removed cropToSize option, defaults to NO always (like the other platforms) re: CB-54, CB-183
+ Removing verbose logging that is confusing devs.
+ Workaround for CB-509 - geolocation.clearWatch doesn't shut the GPS down under iOS
+ Fixed CB-537 - media.seekTo fails with NSRangeException
+ Fixed CB-544 - iOS Geolocation fails if Cordova.plist EnableLocation = YES
+ Fixed CB-543 - FileTransfer.upload WebKit discarded an uncaught exception
+ Fixed CB-391 - camera.getPicture crash
+ Update to CB-391 - remove 10 sec purge check, leaving it up to the iOS watchdog to re-send memory warning again
+ Fixed CB-535 - Add a way to log JavaScript exceptions, parse errors, and get JS stack frame events (with line numbers, etc)
+ Added doc for CB-535 - JavaScript Exception Logging
+ Fixed CB-494 - Move Cordova.plist section from "How to use Cordova as a Component Guide" to its own doc
+ Added cordova-js 1.7.0rc1
+ Updated VERSION to 1.7.0rc1, updated Makefile to include new guides.
blackberry
Fil Maj (1):
- version 1.6.1
+ bumping version to 1.7.0rc1
android
-Joe Bowser (4):
- Copying new XML into the templates for 1.6.1. Turns out tags are broken
- Getting setup to tag 1.6.1
- CB-489 - Adding .js to the example, thought it was removed for a reason
- Adding fix for CB-482
+Fil Maj (3):
+ [CB-164] Changed network plugin to sync from async and removed setKeepCallback(true) on plugin result in there. Fixes location.reload() not firing deviceready due to network plugin being unresponsive
+ Proper fix for CB-164. Online/offline events now propagated to webview properly
+ [CB-473] run ant clean before ant debug install
+
+Joe Bowser (5):
+ CB-480 work, back button and history issues are preventing this from being tested properly
+ Fixed back button behaviour. WIN
+ Reverting the back button change that I made, for some reason certain methods aren't inherited when you extend DroidGap
+ Fix for CB-549
+ Incrementing project to 1.7.0rc1
macdonst (2):
- Remove duplicate files from repository
- Automatically update index.html in templates directory on version change
+ CB-539: FileTransfer.download fails when target starts with 'file://'
+ Removing un-needed logs
windows
-Jesse MacFadyen (3):
- cleanup console logging, toLower on OverrideBackButton
- updated for 1.6.1
- updated template, permissions, and js
+Jesse MacFadyen (11):
+ added hint to debug output when device ready cannot fire because the dev did not include the tag in their page.
+ release was private, and therefore uncallable from js
+ changed test project to use updated tests + jasmine
+ remove method added, dispatches not supported error
+ debug output for exception in ProcessCommand
+ remove unused
+ added mouse support
+ fancy animation on load, ala metro style
+ splash image is animated away on load
+ update JS from cordova-js, update version file
+ rebuild of lib + template gen
+
+Takashi Okamoto (1):
+ Fixed filetransfer boundary without parameter.
webos
hermwong (1):
- update to 1.6.1
+ update version to 1.7.0
bada
-Anis Kadri (5):
- updating bada project parameters
- adding artwork and removing old phonegap references
- CB-4 adding Apache Source Headers
- fixing network problem
- updating version to 1.6.1
+Anis Kadri (1):
+ updating version to 1.7.0rc1
diff --git a/doc/_index.html b/doc/_index.html
index 529e058a..dc74057f 100644
--- a/doc/_index.html
+++ b/doc/_index.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_accelerometer_accelerometer.md.html b/doc/cordova_accelerometer_accelerometer.md.html
index 9f5b35a8..124f0667 100644
--- a/doc/cordova_accelerometer_accelerometer.md.html
+++ b/doc/cordova_accelerometer_accelerometer.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_camera_camera.md.html b/doc/cordova_camera_camera.md.html
index 1773c827..9aba3494 100644
--- a/doc/cordova_camera_camera.md.html
+++ b/doc/cordova_camera_camera.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
@@ -139,7 +140,7 @@
Save the data locally (LocalStorage
, Lawnchair , etc)
Post the data to a remote server
-Note: The image quality of pictures taken using the camera on newer devices is quite good. Encoding such images using Base64 has caused memory issues on some of these devices (iPhone 4, BlackBerry Torch 9800). Therefore, using FILE_URI as the 'Camera .destinationType' is highly recommended.
+Note: The image quality of pictures taken using the camera on newer devices is quite good, and images from the Photo Album will not be downscaled to a lower quality, even if a quality parameter is specified. Encoding such images using Base64 has caused memory issues on some of these devices (iPhone 4, BlackBerry Torch 9800). Therefore, using FILE_URI as the 'Camera .destinationType' is highly recommended.
Supported Platforms
diff --git a/doc/cordova_compass_compass.md.html b/doc/cordova_compass_compass.md.html
index 4f5e6d2d..8e3dfede 100644
--- a/doc/cordova_compass_compass.md.html
+++ b/doc/cordova_compass_compass.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_connection_connection.md.html b/doc/cordova_connection_connection.md.html
index e4f04bca..5c261fbe 100644
--- a/doc/cordova_connection_connection.md.html
+++ b/doc/cordova_connection_connection.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_contacts_contacts.md.html b/doc/cordova_contacts_contacts.md.html
index 704cae6e..801bb34e 100644
--- a/doc/cordova_contacts_contacts.md.html
+++ b/doc/cordova_contacts_contacts.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_device_device.md.html b/doc/cordova_device_device.md.html
index b71d5535..82f3061c 100644
--- a/doc/cordova_device_device.md.html
+++ b/doc/cordova_device_device.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_events_events.md.html b/doc/cordova_events_events.md.html
index bd407ca3..27bb667d 100644
--- a/doc/cordova_events_events.md.html
+++ b/doc/cordova_events_events.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_file_file.md.html b/doc/cordova_file_file.md.html
index 83bc5bee..21599ed1 100644
--- a/doc/cordova_file_file.md.html
+++ b/doc/cordova_file_file.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
@@ -524,13 +525,13 @@
truncate : Shortens the file to the length specified.
-write : Writes data to the file.
+write : Writes data to the file with a UTF-8 encoding.
-The FileWriter
object is a way to write files from the devices file system. Users register their own event listeners to receive the writestart, progress, write, writeend, error and abort events.
+The FileWriter
object is a way to write files to the device file system (UTF-8 encoded). Users register their own event listeners to receive the writestart, progress, write, writeend, error and abort events.
A FileWriter is created for a single file. You can use it to write to a file multiple times. The FileWriter maintains the file's position and length attributes, so you can seek and write anywhere in the file. By default, the FileWriter writes to the beginning of the file (will overwrite existing data). Set the optional append boolean to true in the FileWriter 's constructor to begin writing to the end of the file.
diff --git a/doc/cordova_geolocation_geolocation.md.html b/doc/cordova_geolocation_geolocation.md.html
index e7735d7c..3a1bdb8d 100644
--- a/doc/cordova_geolocation_geolocation.md.html
+++ b/doc/cordova_geolocation_geolocation.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_media_capture_capture.md.html b/doc/cordova_media_capture_capture.md.html
index 0e46d7aa..b476cdb0 100644
--- a/doc/cordova_media_capture_capture.md.html
+++ b/doc/cordova_media_capture_capture.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_media_media.md.html b/doc/cordova_media_media.md.html
index 70574b3c..d1ab7842 100644
--- a/doc/cordova_media_media.md.html
+++ b/doc/cordova_media_media.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_notification_notification.md.html b/doc/cordova_notification_notification.md.html
index c333bb9d..2589e3aa 100644
--- a/doc/cordova_notification_notification.md.html
+++ b/doc/cordova_notification_notification.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/cordova_storage_storage.md.html b/doc/cordova_storage_storage.md.html
index f32cb0b1..e03a1524 100644
--- a/doc/cordova_storage_storage.md.html
+++ b/doc/cordova_storage_storage.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_android_index.md.html b/doc/guide_getting-started_android_index.md.html
index ec918352..eaa31ba3 100644
--- a/doc/guide_getting-started_android_index.md.html
+++ b/doc/guide_getting-started_android_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_blackberry_index.md.html b/doc/guide_getting-started_blackberry_index.md.html
index 08f27159..f13f0896 100644
--- a/doc/guide_getting-started_blackberry_index.md.html
+++ b/doc/guide_getting-started_blackberry_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_index.md.html b/doc/guide_getting-started_index.md.html
index 8b464c53..e4fccf39 100644
--- a/doc/guide_getting-started_index.md.html
+++ b/doc/guide_getting-started_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_ios_index.md.html b/doc/guide_getting-started_ios_index.md.html
index e7e7ccc0..8a9872fb 100644
--- a/doc/guide_getting-started_ios_index.md.html
+++ b/doc/guide_getting-started_ios_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_symbian_index.md.html b/doc/guide_getting-started_symbian_index.md.html
index 610845ab..5021a5ad 100644
--- a/doc/guide_getting-started_symbian_index.md.html
+++ b/doc/guide_getting-started_symbian_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_webos_index.md.html b/doc/guide_getting-started_webos_index.md.html
index cb745ba0..36ba1b18 100644
--- a/doc/guide_getting-started_webos_index.md.html
+++ b/doc/guide_getting-started_webos_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/guide_getting-started_windows-phone_index.md.html b/doc/guide_getting-started_windows-phone_index.md.html
index 5d9a04cf..092cb115 100644
--- a/doc/guide_getting-started_windows-phone_index.md.html
+++ b/doc/guide_getting-started_windows-phone_index.md.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/doc/index.html b/doc/index.html
index 74d115ab..05966664 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -15,7 +15,8 @@
edge
-1.6.1
+1.7.0rc1
+1.6.1
1.6.0rc1
1.6.0
1.5.0rc1
diff --git a/lib/android/VERSION b/lib/android/VERSION
index 9c6d6293..d88d8e71 100644
--- a/lib/android/VERSION
+++ b/lib/android/VERSION
@@ -1 +1 @@
-1.6.1
+1.7.0rc1
diff --git a/lib/android/cordova-1.6.1.jar b/lib/android/cordova-1.7.0rc1.jar
similarity index 74%
rename from lib/android/cordova-1.6.1.jar
rename to lib/android/cordova-1.7.0rc1.jar
index 75b7e058..bfa27ab8 100644
Binary files a/lib/android/cordova-1.6.1.jar and b/lib/android/cordova-1.7.0rc1.jar differ
diff --git a/lib/android/example/assets/www/cordova-1.6.1.js b/lib/android/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/android/example/assets/www/cordova-1.6.1.js
rename to lib/android/cordova-1.7.0rc1.js
index 1b879160..cf56912e 100644
--- a/lib/android/example/assets/www/cordova-1.6.1.js
+++ b/lib/android/cordova-1.7.0rc1.js
@@ -1,6 +1,6 @@
-// commit b2de4baa76a94ecb916619a536339ffee9ef6843
+// commit 017a948047e355ae0c2cdc8c4188ae57b115528a
-// File generated at :: Tue Apr 17 2012 12:19:35 GMT-0700 (PDT)
+// File generated at :: Mon Apr 23 2012 11:36:23 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -67,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -115,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -149,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -292,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -304,7 +319,7 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
@@ -326,6 +341,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -502,10 +519,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -542,7 +559,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -587,7 +604,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -601,7 +618,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -656,7 +673,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -841,7 +857,6 @@ module.exports = {
}
}
};
-
});
// file: lib/android/exec.js
@@ -873,7 +888,8 @@ module.exports = function(success, fail, service, action, args) {
// If a result was returned
if (r.length > 0) {
- eval("var v="+r+";");
+ var v;
+ eval("v="+r+";");
// If status is OK, then return value back to caller
if (v.status === cordova.callbackStatus.OK) {
@@ -1003,7 +1019,7 @@ module.exports = {
var db = null;
try {
db = originalOpenDatabase(name, version, desc, size);
- }
+ }
catch (ex) {
if (ex.code === 18) {
db = null;
@@ -1018,7 +1034,7 @@ module.exports = {
else {
return db;
}
-
+
};
}
@@ -1077,7 +1093,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -1090,7 +1105,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1172,35 +1186,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1225,7 +1238,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1234,16 +1246,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1255,7 +1266,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1267,7 +1278,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1276,14 +1286,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1292,16 +1301,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1319,7 +1327,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1332,7 +1339,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1341,18 +1347,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1361,15 +1366,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1390,7 +1394,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1399,7 +1403,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1414,7 +1418,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1533,7 +1537,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1545,13 +1549,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1581,7 +1584,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1607,7 +1609,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1628,7 +1629,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1646,7 +1646,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1671,7 +1670,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1699,7 +1697,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1747,7 +1744,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1755,6 +1751,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1837,7 +1834,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1858,10 +1856,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -4410,19 +4383,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -4484,7 +4456,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -4548,7 +4519,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -4583,7 +4554,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -4648,7 +4618,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -4709,7 +4678,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/common/plugin/requestFileSystem.js
@@ -4754,13 +4722,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -4822,12 +4790,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -4835,15 +4803,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -4886,7 +4854,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -4909,7 +4877,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -4920,20 +4887,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -4966,11 +4919,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -4983,5 +4936,4 @@ window.cordova = require('cordova');
}(window));
-
})();
\ No newline at end of file
diff --git a/lib/android/example/libs/cordova-1.6.1.jar b/lib/android/example/.cordova/android/cordova-1.7.0rc1.jar
similarity index 74%
rename from lib/android/example/libs/cordova-1.6.1.jar
rename to lib/android/example/.cordova/android/cordova-1.7.0rc1.jar
index 75b7e058..bfa27ab8 100644
Binary files a/lib/android/example/libs/cordova-1.6.1.jar and b/lib/android/example/.cordova/android/cordova-1.7.0rc1.jar differ
diff --git a/lib/android/cordova-1.6.1.js b/lib/android/example/.cordova/android/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/android/cordova-1.6.1.js
rename to lib/android/example/.cordova/android/cordova-1.7.0rc1.js
index 1b879160..cf56912e 100644
--- a/lib/android/cordova-1.6.1.js
+++ b/lib/android/example/.cordova/android/cordova-1.7.0rc1.js
@@ -1,6 +1,6 @@
-// commit b2de4baa76a94ecb916619a536339ffee9ef6843
+// commit 017a948047e355ae0c2cdc8c4188ae57b115528a
-// File generated at :: Tue Apr 17 2012 12:19:35 GMT-0700 (PDT)
+// File generated at :: Mon Apr 23 2012 11:36:23 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -67,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -115,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -149,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -292,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -304,7 +319,7 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
@@ -326,6 +341,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -502,10 +519,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -542,7 +559,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -587,7 +604,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -601,7 +618,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -656,7 +673,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -841,7 +857,6 @@ module.exports = {
}
}
};
-
});
// file: lib/android/exec.js
@@ -873,7 +888,8 @@ module.exports = function(success, fail, service, action, args) {
// If a result was returned
if (r.length > 0) {
- eval("var v="+r+";");
+ var v;
+ eval("v="+r+";");
// If status is OK, then return value back to caller
if (v.status === cordova.callbackStatus.OK) {
@@ -1003,7 +1019,7 @@ module.exports = {
var db = null;
try {
db = originalOpenDatabase(name, version, desc, size);
- }
+ }
catch (ex) {
if (ex.code === 18) {
db = null;
@@ -1018,7 +1034,7 @@ module.exports = {
else {
return db;
}
-
+
};
}
@@ -1077,7 +1093,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -1090,7 +1105,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1172,35 +1186,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1225,7 +1238,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1234,16 +1246,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1255,7 +1266,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1267,7 +1278,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1276,14 +1286,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1292,16 +1301,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1319,7 +1327,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1332,7 +1339,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1341,18 +1347,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1361,15 +1366,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1390,7 +1394,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1399,7 +1403,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1414,7 +1418,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1533,7 +1537,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1545,13 +1549,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1581,7 +1584,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1607,7 +1609,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1628,7 +1629,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1646,7 +1646,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1671,7 +1670,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1699,7 +1697,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1747,7 +1744,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1755,6 +1751,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1837,7 +1834,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1858,10 +1856,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -4410,19 +4383,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -4484,7 +4456,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -4548,7 +4519,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -4583,7 +4554,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -4648,7 +4618,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -4709,7 +4678,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/common/plugin/requestFileSystem.js
@@ -4754,13 +4722,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -4822,12 +4790,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -4835,15 +4803,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -4886,7 +4854,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -4909,7 +4877,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -4920,20 +4887,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -4966,11 +4919,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -4983,5 +4936,4 @@ window.cordova = require('cordova');
}(window));
-
})();
\ No newline at end of file
diff --git a/lib/android/example/.cordova/config b/lib/android/example/.cordova/config
index 85ef6878..15f1f59c 100644
--- a/lib/android/example/.cordova/config
+++ b/lib/android/example/.cordova/config
@@ -1,4 +1,4 @@
-VERSION=1.6.1
+VERSION=1.7.0rc1
PROJECT_PATH=./example
PACKAGE=org.apache.cordova.example
ACTIVITY=cordovaExample
diff --git a/lib/android/example/.cordova/android/cordova-1.6.1.js b/lib/android/example/assets/www/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/android/example/.cordova/android/cordova-1.6.1.js
rename to lib/android/example/assets/www/cordova-1.7.0rc1.js
index 1b879160..cf56912e 100644
--- a/lib/android/example/.cordova/android/cordova-1.6.1.js
+++ b/lib/android/example/assets/www/cordova-1.7.0rc1.js
@@ -1,6 +1,6 @@
-// commit b2de4baa76a94ecb916619a536339ffee9ef6843
+// commit 017a948047e355ae0c2cdc8c4188ae57b115528a
-// File generated at :: Tue Apr 17 2012 12:19:35 GMT-0700 (PDT)
+// File generated at :: Mon Apr 23 2012 11:36:23 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -67,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -115,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -149,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -292,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -304,7 +319,7 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
@@ -326,6 +341,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -502,10 +519,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -542,7 +559,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -587,7 +604,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -601,7 +618,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -656,7 +673,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -841,7 +857,6 @@ module.exports = {
}
}
};
-
});
// file: lib/android/exec.js
@@ -873,7 +888,8 @@ module.exports = function(success, fail, service, action, args) {
// If a result was returned
if (r.length > 0) {
- eval("var v="+r+";");
+ var v;
+ eval("v="+r+";");
// If status is OK, then return value back to caller
if (v.status === cordova.callbackStatus.OK) {
@@ -1003,7 +1019,7 @@ module.exports = {
var db = null;
try {
db = originalOpenDatabase(name, version, desc, size);
- }
+ }
catch (ex) {
if (ex.code === 18) {
db = null;
@@ -1018,7 +1034,7 @@ module.exports = {
else {
return db;
}
-
+
};
}
@@ -1077,7 +1093,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -1090,7 +1105,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1172,35 +1186,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1225,7 +1238,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1234,16 +1246,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1255,7 +1266,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1267,7 +1278,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1276,14 +1286,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1292,16 +1301,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1319,7 +1327,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1332,7 +1339,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1341,18 +1347,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1361,15 +1366,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1390,7 +1394,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1399,7 +1403,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1414,7 +1418,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1533,7 +1537,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1545,13 +1549,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1581,7 +1584,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1607,7 +1609,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1628,7 +1629,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1646,7 +1646,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1671,7 +1670,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1699,7 +1697,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1747,7 +1744,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1755,6 +1751,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1837,7 +1834,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1858,10 +1856,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -4410,19 +4383,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -4484,7 +4456,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -4548,7 +4519,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -4583,7 +4554,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -4648,7 +4618,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -4709,7 +4678,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/common/plugin/requestFileSystem.js
@@ -4754,13 +4722,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -4822,12 +4790,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -4835,15 +4803,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -4886,7 +4854,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -4909,7 +4877,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -4920,20 +4887,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -4966,11 +4919,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -4983,5 +4936,4 @@ window.cordova = require('cordova');
}(window));
-
})();
\ No newline at end of file
diff --git a/lib/android/example/assets/www/index.html b/lib/android/example/assets/www/index.html
index bf3e0859..88927d72 100644
--- a/lib/android/example/assets/www/index.html
+++ b/lib/android/example/assets/www/index.html
@@ -5,7 +5,7 @@
PhoneGap
-
+
diff --git a/lib/android/example/cordova/debug b/lib/android/example/cordova/debug
index 8dd31874..0bac2c79 100755
--- a/lib/android/example/cordova/debug
+++ b/lib/android/example/cordova/debug
@@ -4,6 +4,6 @@
# if there are no devices listed then emulate
-
+ant clean
ant debug install
adb shell am start -n $PACKAGE/$PACKAGE.$ACTIVITY
diff --git a/lib/android/example/cordova/templates/project/assets/www/index.html b/lib/android/example/cordova/templates/project/assets/www/index.html
index bf3e0859..88927d72 100644
--- a/lib/android/example/cordova/templates/project/assets/www/index.html
+++ b/lib/android/example/cordova/templates/project/assets/www/index.html
@@ -5,7 +5,7 @@
PhoneGap
-
+
diff --git a/lib/android/example/.cordova/android/cordova-1.6.1.jar b/lib/android/example/libs/cordova-1.7.0rc1.jar
similarity index 74%
rename from lib/android/example/.cordova/android/cordova-1.6.1.jar
rename to lib/android/example/libs/cordova-1.7.0rc1.jar
index 75b7e058..bfa27ab8 100644
Binary files a/lib/android/example/.cordova/android/cordova-1.6.1.jar and b/lib/android/example/libs/cordova-1.7.0rc1.jar differ
diff --git a/lib/bada/VERSION b/lib/bada/VERSION
index 64a542d4..e07cf32a 100644
--- a/lib/bada/VERSION
+++ b/lib/bada/VERSION
@@ -1,2 +1,2 @@
-1.6.1
+1.7.0rc1
diff --git a/lib/bada/src/Device.cpp b/lib/bada/src/Device.cpp
index 15246baf..a22eb541 100755
--- a/lib/bada/src/Device.cpp
+++ b/lib/bada/src/Device.cpp
@@ -69,7 +69,7 @@ Device::SetDeviceInfo() {
if(r == E_SUCCESS) {
String res;
- res.Format(1024, L"window.device={platform:'bada',version:'%S',name:'n/a',cordova:'1.6.1',uuid:'%S'}", platformVersion.GetPointer(), imei.GetPointer());
+ res.Format(1024, L"window.device={platform:'bada',version:'%S',name:'n/a',cordova:'1.7.0rc1',uuid:'%S'}", platformVersion.GetPointer(), imei.GetPointer());
//AppLogDebug("%S", res.GetPointer());
pWeb->EvaluateJavascriptN(res);
}
diff --git a/lib/blackberry/sample/lib/cordova.1.6.1/ext-air/Cordova_Network/library.xml b/lib/blackberry/sample/lib/cordova.1.7.0rc1/ext-air/Cordova_Network/library.xml
similarity index 100%
rename from lib/blackberry/sample/lib/cordova.1.6.1/ext-air/Cordova_Network/library.xml
rename to lib/blackberry/sample/lib/cordova.1.7.0rc1/ext-air/Cordova_Network/library.xml
diff --git a/lib/blackberry/sample/lib/cordova.1.6.1/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as b/lib/blackberry/sample/lib/cordova.1.7.0rc1/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
similarity index 100%
rename from lib/blackberry/sample/lib/cordova.1.6.1/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
rename to lib/blackberry/sample/lib/cordova.1.7.0rc1/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as
diff --git a/lib/blackberry/sample/www/ext/cordova.1.6.1.jar b/lib/blackberry/sample/lib/cordova.1.7.0rc1/ext/cordova.1.7.0rc1.jar
similarity index 92%
rename from lib/blackberry/sample/www/ext/cordova.1.6.1.jar
rename to lib/blackberry/sample/lib/cordova.1.7.0rc1/ext/cordova.1.7.0rc1.jar
index 42ecff8c..a7af983c 100644
Binary files a/lib/blackberry/sample/www/ext/cordova.1.6.1.jar and b/lib/blackberry/sample/lib/cordova.1.7.0rc1/ext/cordova.1.7.0rc1.jar differ
diff --git a/lib/blackberry/sample/www/cordova-1.6.1.js b/lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/blackberry/sample/www/cordova-1.6.1.js
rename to lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/cordova-1.7.0rc1.js
index 801b37f9..d4680da6 100644
--- a/lib/blackberry/sample/www/cordova-1.6.1.js
+++ b/lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/cordova-1.7.0rc1.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 15:32:24 GMT-0500 (CDT)
+// commit a42f0ae6245e7609c9bad1eb582777a696201aad
+
+// File generated at :: Tue Apr 24 2012 15:08:45 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -65,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -113,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -147,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -290,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -302,13 +319,16 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
if (!window.PhoneGap) {
window.PhoneGap = cordova;
}
+if (!window.Cordova) {
+ window.Cordova = cordova;
+}
/**
* Plugins object
@@ -324,6 +344,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -500,10 +522,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -540,7 +562,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -585,7 +607,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -599,7 +621,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -654,7 +676,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -839,7 +860,6 @@ module.exports = {
}
}
};
-
});
// file: lib/blackberry/exec.js
@@ -901,7 +921,6 @@ module.exports = function(success, fail, service, action, args) {
utils.alert("Error: "+e);
}
};
-
});
// file: lib/blackberry/platform.js
@@ -1085,7 +1104,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -1098,7 +1116,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1180,35 +1197,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1233,7 +1249,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1242,16 +1257,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1263,7 +1277,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1275,7 +1289,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1284,14 +1297,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1300,16 +1312,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1327,7 +1338,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1340,7 +1350,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1349,18 +1358,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1369,15 +1377,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1398,7 +1405,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1407,7 +1414,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1422,7 +1429,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1541,7 +1548,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1553,13 +1560,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1589,7 +1595,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1615,7 +1620,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1636,7 +1640,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1654,7 +1657,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1679,7 +1681,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1707,7 +1708,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1755,7 +1755,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1763,6 +1762,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1845,7 +1845,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1866,10 +1867,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -5060,19 +5039,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -5134,7 +5112,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -5198,7 +5175,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -5233,7 +5210,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -5298,7 +5274,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -5359,7 +5334,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/common/plugin/requestFileSystem.js
@@ -5404,13 +5378,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -5469,7 +5443,6 @@ module.exports = {
return {"status" : cordova.callbackStatus.CLASS_NOT_FOUND_EXCEPTION, "message" : "Class " + clazz + " cannot be found"};
}
};
-
});
// file: lib/common/utils.js
@@ -5491,12 +5464,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -5504,15 +5477,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -5555,7 +5528,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -5578,7 +5551,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -5589,20 +5561,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -5635,11 +5593,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -5652,5 +5610,4 @@ window.cordova = require('cordova');
}(window));
-
})();
\ No newline at end of file
diff --git a/lib/blackberry/sample/www/playbook/cordova-1.6.1.js b/lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/playbook/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/blackberry/sample/www/playbook/cordova-1.6.1.js
rename to lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/playbook/cordova-1.7.0rc1.js
index 4e74c4fa..0a180bbb 100644
--- a/lib/blackberry/sample/www/playbook/cordova-1.6.1.js
+++ b/lib/blackberry/sample/lib/cordova.1.7.0rc1/javascript/playbook/cordova-1.7.0rc1.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 15:32:25 GMT-0500 (CDT)
+// commit a42f0ae6245e7609c9bad1eb582777a696201aad
+
+// File generated at :: Tue Apr 24 2012 15:08:45 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -65,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -113,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -147,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -290,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -302,13 +319,16 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
if (!window.PhoneGap) {
window.PhoneGap = cordova;
}
+if (!window.Cordova) {
+ window.Cordova = cordova;
+}
/**
* Plugins object
@@ -324,6 +344,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -500,10 +522,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -540,7 +562,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -585,7 +607,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -599,7 +621,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -654,7 +676,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -839,7 +860,6 @@ module.exports = {
}
}
};
-
});
// file: lib/playbook/exec.js
@@ -902,7 +922,6 @@ module.exports = function(success, fail, service, action, args) {
utils.alert("Error: "+e);
}
};
-
});
// file: lib/playbook/platform.js
@@ -925,7 +944,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -938,7 +956,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1020,35 +1037,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1073,7 +1089,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1082,16 +1097,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1103,7 +1117,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1115,7 +1129,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1124,14 +1137,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1140,16 +1152,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1167,7 +1178,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1180,7 +1190,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1189,18 +1198,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1209,15 +1217,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1238,7 +1245,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1247,7 +1254,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1262,7 +1269,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1381,7 +1388,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1393,13 +1400,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1429,7 +1435,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1455,7 +1460,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1476,7 +1480,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1494,7 +1497,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1519,7 +1521,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1547,7 +1548,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1595,7 +1595,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1603,6 +1602,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1685,7 +1685,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1706,10 +1707,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -3517,19 +3497,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -3591,7 +3570,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -3655,7 +3633,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -3690,7 +3668,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -3755,7 +3732,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -3816,7 +3792,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/playbook/plugin/playbook/device.js
@@ -3845,13 +3820,13 @@ channel.onCordovaReady.subscribeOnce(function() {
});
module.exports = me;
-
});
// file: lib/playbook/plugin/playbook/manager.js
define("cordova/plugin/playbook/manager", function(require, exports, module) {
var webworks = require('cordova/plugin/webworks/manager'),
cordova = require('cordova'),
+ MediaFile = require('cordova/plugin/MediaFile'),
/**
* Private list of HTML 5 audio objects, indexed by the Cordova media object ids
*/
@@ -3876,8 +3851,7 @@ var webworks = require('cordova/plugin/webworks/manager'),
"isPlugged" : state === 2
};
- if (me._isPlugged !== info.isPlugged
- && typeof win === 'function') {
+ if (me._isPlugged !== info.isPlugged && typeof win === 'function') {
win(info);
}
}
@@ -3917,7 +3891,7 @@ var webworks = require('cordova/plugin/webworks/manager'),
"name" : blackberry.system.model,
"uuid" : blackberry.identity.PIN,
"platform" : "PlayBook",
- "cordova" : "1.6.1"
+ "cordova" : "1.7.0rc1"
}
};
}
@@ -4218,13 +4192,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -4283,7 +4257,6 @@ module.exports = {
return {"status" : cordova.callbackStatus.CLASS_NOT_FOUND_EXCEPTION, "message" : "Class " + clazz + " cannot be found"};
}
};
-
});
// file: lib/common/utils.js
@@ -4305,12 +4278,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -4318,15 +4291,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -4369,7 +4342,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -4392,7 +4365,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -4403,20 +4375,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -4449,11 +4407,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -4465,9 +4423,7 @@ window.cordova = require('cordova');
}
}(window));
-
// file: lib/scripts/bootstrap-playbook.js
require('cordova/channel').onNativeReady.fire();
-
-})();
+})();
\ No newline at end of file
diff --git a/lib/blackberry/www/cordova-1.6.1.js b/lib/blackberry/sample/www/cordova-1.7.0rc1.js
similarity index 95%
rename from lib/blackberry/www/cordova-1.6.1.js
rename to lib/blackberry/sample/www/cordova-1.7.0rc1.js
index 801b37f9..d4680da6 100644
--- a/lib/blackberry/www/cordova-1.6.1.js
+++ b/lib/blackberry/sample/www/cordova-1.7.0rc1.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 15:32:24 GMT-0500 (CDT)
+// commit a42f0ae6245e7609c9bad1eb582777a696201aad
+
+// File generated at :: Tue Apr 24 2012 15:08:45 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -65,10 +67,20 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
-
// file: lib/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete') {
+ channel.onDOMContentLoaded.fire();
+}
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -113,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
};
document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
- if (typeof documentEventHandlers[e] != "undefined") {
- documentEventHandlers[e].unsubscribe(handler);
- } else {
- m_document_removeEventListener.call(document, evt, handler, capture);
- }
+ var e = evt.toLowerCase();
+ // Check for pause/resume events first.
+ if (e == 'resume') {
+ channel.onResume.unsubscribe(handler);
+ } else if (e == 'pause') {
+ channel.onPause.unsubscribe(handler);
+ // If unsubcribing from an event that is handled by a plugin
+ } else if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
};
window.removeEventListener = function(evt, handler, capture) {
@@ -147,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined")
{
- window.console = {
- log:function(){}
- };
+ window.console = {
+ log:function(){}
+ };
}
var cordova = {
@@ -290,7 +307,7 @@ var cordova = {
console.log("Error: Plugin "+name+" already exists.");
}
},
-
+
addConstructor: function(func) {
channel.onCordovaReady.subscribeOnce(function() {
try {
@@ -302,13 +319,16 @@ var cordova = {
}
};
-/**
+/**
* Legacy variable for plugin support
* TODO: remove in 2.0.
*/
if (!window.PhoneGap) {
window.PhoneGap = cordova;
}
+if (!window.Cordova) {
+ window.Cordova = cordova;
+}
/**
* Plugins object
@@ -324,6 +344,8 @@ module.exports = cordova;
// file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
@@ -500,10 +522,10 @@ var Channel = function(type, opts) {
/**
* cordova Channels that must fire before "deviceready" is fired.
- */
+ */
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
-
+
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
@@ -540,7 +562,7 @@ var Channel = function(type, opts) {
utils = require('cordova/utils');
/**
- * Subscribes the given function to the channel. Any time that
+ * Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
@@ -585,7 +607,7 @@ Channel.prototype.subscribeOnce = function(f, c) {
return g;
};
-/**
+/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(g) {
@@ -599,7 +621,7 @@ Channel.prototype.unsubscribe = function(g) {
if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
};
-/**
+/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
@@ -654,7 +676,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel;
-
});
// file: lib/common/common.js
@@ -839,7 +860,6 @@ module.exports = {
}
}
};
-
});
// file: lib/blackberry/exec.js
@@ -901,7 +921,6 @@ module.exports = function(success, fail, service, action, args) {
utils.alert("Error: "+e);
}
};
-
});
// file: lib/blackberry/platform.js
@@ -1085,7 +1104,6 @@ module.exports = {
}
}
};
-
});
// file: lib/common/plugin/Acceleration.js
@@ -1098,7 +1116,6 @@ var Acceleration = function(x, y, z, timestamp) {
};
module.exports = Acceleration;
-
});
// file: lib/common/plugin/Camera.js
@@ -1180,35 +1197,34 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
if (typeof options.encodingType == "number") {
encodingType = options.encodingType;
}
-
+
var mediaType = Camera.MediaType.PICTURE;
if (typeof options.mediaType == "number") {
mediaType = options.mediaType;
}
var allowEdit = false;
if (typeof options.allowEdit == "boolean") {
- allowEdit = options.allowEdit;
+ allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") {
- allowEdit = options.allowEdit <= 0 ? false : true;
+ allowEdit = options.allowEdit <= 0 ? false : true;
}
var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") {
- correctOrientation = options.correctOrientation;
+ correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") {
- correctOrientation = options.correctOrientation <=0 ? false : true;
+ correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
- saveToPhotoAlbum = options.saveToPhotoAlbum;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
- saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
-}
+};
module.exports = cameraExport;
-
});
// file: lib/common/plugin/CameraConstants.js
@@ -1233,7 +1249,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
}
};
-
});
// file: lib/common/plugin/CaptureAudioOptions.js
@@ -1242,16 +1257,15 @@ define("cordova/plugin/CaptureAudioOptions", function(require, exports, module)
* Encapsulates all audio capture operation configuration options.
*/
var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
};
module.exports = CaptureAudioOptions;
-
});
// file: lib/common/plugin/CaptureError.js
@@ -1263,7 +1277,7 @@ var CaptureError = function(c) {
this.code = c || null;
};
-// Camera or microphone failed to capture image or sound.
+// Camera or microphone failed to capture image or sound.
CaptureError.CAPTURE_INTERNAL_ERR = 0;
// Camera application or audio capture application is currently serving other capture request.
CaptureError.CAPTURE_APPLICATION_BUSY = 1;
@@ -1275,7 +1289,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError;
-
});
// file: lib/common/plugin/CaptureImageOptions.js
@@ -1284,14 +1297,13 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
* Encapsulates all image capture operation configuration options.
*/
var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
};
module.exports = CaptureImageOptions;
-
});
// file: lib/common/plugin/CaptureVideoOptions.js
@@ -1300,16 +1312,15 @@ define("cordova/plugin/CaptureVideoOptions", function(require, exports, module)
* Encapsulates all video capture operation configuration options.
*/
var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
};
module.exports = CaptureVideoOptions;
-
});
// file: lib/common/plugin/CompassError.js
@@ -1327,7 +1338,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError;
-
});
// file: lib/common/plugin/CompassHeading.js
@@ -1340,7 +1350,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
};
module.exports = CompassHeading;
-
});
// file: lib/common/plugin/ConfigurationData.js
@@ -1349,18 +1358,17 @@ define("cordova/plugin/ConfigurationData", function(require, exports, module) {
* Encapsulates a set of parameters that the capture device supports.
*/
function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
this.height = 0;
- // The width attribute represents width of the image or video in pixels.
+ // The width attribute represents width of the image or video in pixels.
// In the case of a sound clip this attribute has value 0
this.width = 0;
}
module.exports = ConfigurationData;
-
});
// file: lib/common/plugin/Connection.js
@@ -1369,15 +1377,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status
*/
module.exports = {
- UNKNOWN: "unknown",
- ETHERNET: "ethernet",
- WIFI: "wifi",
- CELL_2G: "2g",
- CELL_3G: "3g",
- CELL_4G: "4g",
- NONE: "none"
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
};
-
});
// file: lib/common/plugin/Contact.js
@@ -1398,7 +1405,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date.");
}
return contact;
-};
+}
/**
* Converts Complex objects into primitives
@@ -1407,7 +1414,7 @@ function convertIn(contact) {
function convertOut(contact) {
var value = contact.birthday;
- if (value != null) {
+ if (value !== null) {
// try to make it a Date object if it is not already
if (!value instanceof Date){
try {
@@ -1422,7 +1429,7 @@ function convertOut(contact) {
contact.birthday = value;
}
return contact;
-};
+}
/**
* Contains information about a single contact.
@@ -1541,7 +1548,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) {
errorCB(new ContactError(code));
};
- var success = function(result) {
+ var success = function(result) {
if (result) {
if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result);
@@ -1553,13 +1560,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR);
}
};
- var dupContact = convertOut(utils.clone(this));
- exec(success, fail, "Contacts", "save", [dupContact]);
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
};
module.exports = Contact;
-
});
// file: lib/common/plugin/ContactAddress.js
@@ -1589,7 +1595,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
};
module.exports = ContactAddress;
-
});
// file: lib/common/plugin/ContactError.js
@@ -1615,7 +1620,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError;
-
});
// file: lib/common/plugin/ContactField.js
@@ -1636,7 +1640,6 @@ var ContactField = function(type, value, pref) {
};
module.exports = ContactField;
-
});
// file: lib/common/plugin/ContactFindOptions.js
@@ -1654,7 +1657,6 @@ var ContactFindOptions = function(filter, multiple) {
};
module.exports = ContactFindOptions;
-
});
// file: lib/common/plugin/ContactName.js
@@ -1679,7 +1681,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
};
module.exports = ContactName;
-
});
// file: lib/common/plugin/ContactOrganization.js
@@ -1707,7 +1708,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
};
module.exports = ContactOrganization;
-
});
// file: lib/common/plugin/Coordinates.js
@@ -1755,7 +1755,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
};
module.exports = Coordinates;
-
});
// file: lib/common/plugin/DirectoryEntry.js
@@ -1763,6 +1762,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'),
exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader');
/**
@@ -1845,7 +1845,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) {
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
/**
* An interface that lists the files and directories in a directory.
@@ -1866,10 +1867,10 @@ DirectoryReader.prototype.readEntries = function(successCallback, errorCallback)
for (var i=0; i 0) {
- // is an iOS request for watch by filter, no timer needed
- timers[id] = "iOS";
- compass.getCurrentHeading(successCallback, errorCallback, options);
- } else {
- // Start watch timer to get headings
- timers[id] = window.setInterval(function() {
- compass.getCurrentHeading(successCallback, errorCallback);
- }, frequency);
- }
-
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
return id;
},
@@ -5060,19 +5039,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) {
// Stop javascript timer & remove from timer list
if (id && timers[id]) {
- if (timers[id] != "iOS") {
- clearInterval(timers[id]);
- } else {
- // is iOS watch by filter so call into device to stop
- exec(null, null, "Compass", "stopHeading", []);
- }
- delete timers[id];
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
}
}
};
module.exports = compass;
-
});
// file: lib/common/plugin/contacts.js
@@ -5134,7 +5112,6 @@ var contacts = {
};
module.exports = contacts;
-
});
// file: lib/common/plugin/geolocation.js
@@ -5198,7 +5175,7 @@ var geolocation = {
errorCallback(new PositionError(e.code, e.message));
};
- exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.timeout, options.maximumAge]);
},
/**
* Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
@@ -5233,7 +5210,6 @@ var geolocation = {
};
module.exports = geolocation;
-
});
// file: lib/common/plugin/network.js
@@ -5298,7 +5274,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
};
module.exports = new NetworkConnection();
-
});
// file: lib/common/plugin/notification.js
@@ -5359,7 +5334,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]);
}
};
-
});
// file: lib/common/plugin/requestFileSystem.js
@@ -5404,13 +5378,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
};
module.exports = requestFileSystem;
-
});
// file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec');
/**
@@ -5469,7 +5443,6 @@ module.exports = {
return {"status" : cordova.callbackStatus.CLASS_NOT_FOUND_EXCEPTION, "message" : "Class " + clazz + " cannot be found"};
}
};
-
});
// file: lib/common/utils.js
@@ -5491,12 +5464,12 @@ var _self = {
* Does a deep clone of the object.
*/
clone: function(obj) {
- if(!obj) {
+ if(!obj) {
return obj;
}
-
+
var retVal, i;
-
+
if(obj instanceof Array){
retVal = [];
for(i = 0; i < obj.length; ++i){
@@ -5504,15 +5477,15 @@ var _self = {
}
return retVal;
}
-
+
if (obj instanceof Function) {
return obj;
}
-
+
if(!(obj instanceof Object)){
return obj;
}
-
+
if(obj instanceof Date){
return obj;
}
@@ -5555,7 +5528,7 @@ var _self = {
*/
extend: (function() {
// proxy used to establish prototype chain
- var F = function() {};
+ var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
@@ -5578,7 +5551,6 @@ var _self = {
};
module.exports = _self;
-
});
@@ -5589,20 +5561,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"),
_self = {
boot: function () {
- //---------------
- // Event handling
- //---------------
-
- /**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
- document.addEventListener('DOMContentLoaded', function() {
- channel.onDOMContentLoaded.fire();
- }, false);
- if (document.readyState == 'complete') {
- channel.onDOMContentLoaded.fire();
- }
-
/**
* Create all cordova objects once page has fully loaded and native side is ready.
*/
@@ -5635,11 +5593,11 @@ window.cordova = require('cordova');
channel.join(function() {
channel.onDeviceReady.fire();
}, channel.deviceReadyChannelsArray);
-
+
}, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
}
};
-
+
// boot up once native side is ready
channel.onNativeReady.subscribeOnce(_self.boot);
@@ -5652,5 +5610,4 @@ window.cordova = require('cordova');
}(window));
-
})();
\ No newline at end of file
diff --git a/lib/blackberry/www/ext/cordova.1.6.1.jar b/lib/blackberry/sample/www/ext/cordova.1.7.0rc1.jar
similarity index 92%
rename from lib/blackberry/www/ext/cordova.1.6.1.jar
rename to lib/blackberry/sample/www/ext/cordova.1.7.0rc1.jar
index 42ecff8c..a7af983c 100644
Binary files a/lib/blackberry/www/ext/cordova.1.6.1.jar and b/lib/blackberry/sample/www/ext/cordova.1.7.0rc1.jar differ
diff --git a/lib/blackberry/sample/www/index.html b/lib/blackberry/sample/www/index.html
index 0a017f4f..9ca266e3 100644
--- a/lib/blackberry/sample/www/index.html
+++ b/lib/blackberry/sample/www/index.html
@@ -4,7 +4,7 @@
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- Back
-
-
-
-
-
-
-
-
-