Incrementing project to 1.7.0rc1

This commit is contained in:
Joe Bowser 2012-04-23 11:37:33 -07:00
parent 05192a91da
commit f4da7e164d
5 changed files with 188 additions and 236 deletions

View File

@ -1 +1 @@
1.6.1 1.7.0rc1

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>PhoneGap</title> <title>PhoneGap</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title"> <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
<script type="text/javascript" charset="utf-8" src="cordova-1.6.1.js"></script> <script type="text/javascript" charset="utf-8" src="cordova-1.7.0rc1.js"></script>
<script type="text/javascript" charset="utf-8" src="main.js"></script> <script type="text/javascript" charset="utf-8" src="main.js"></script>
</head> </head>

View File

@ -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 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.require = require;
module.exports.define = define; module.exports.define = define;
} }
// file: lib/cordova.js // file: lib/cordova.js
define("cordova", function(require, exports, module) { define("cordova", function(require, exports, module) {
var channel = require('cordova/channel'); 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, * Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events. * resume, and pause events.
@ -115,13 +125,18 @@ window.addEventListener = function(evt, handler, capture) {
}; };
document.removeEventListener = function(evt, handler, capture) { document.removeEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase(); var e = evt.toLowerCase();
// If unsubcribing from an event that is handled by a plugin // Check for pause/resume events first.
if (typeof documentEventHandlers[e] != "undefined") { if (e == 'resume') {
documentEventHandlers[e].unsubscribe(handler); channel.onResume.unsubscribe(handler);
} else { } else if (e == 'pause') {
m_document_removeEventListener.call(document, evt, handler, capture); 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) { window.removeEventListener = function(evt, handler, capture) {
@ -149,9 +164,9 @@ function createEvent(type, data) {
if(typeof window.console === "undefined") if(typeof window.console === "undefined")
{ {
window.console = { window.console = {
log:function(){} log:function(){}
}; };
} }
var cordova = { var cordova = {
@ -326,6 +341,8 @@ module.exports = cordova;
// file: lib/common/builder.js // file: lib/common/builder.js
define("cordova/builder", function(require, exports, module) { define("cordova/builder", function(require, exports, module) {
var utils = require('cordova/utils');
function each(objects, func, context) { function each(objects, func, context) {
for (var prop in objects) { for (var prop in objects) {
if (objects.hasOwnProperty(prop)) { if (objects.hasOwnProperty(prop)) {
@ -656,7 +673,6 @@ channel.waitForInitialization('onCordovaInfoReady');
channel.waitForInitialization('onCordovaConnectionReady'); channel.waitForInitialization('onCordovaConnectionReady');
module.exports = channel; module.exports = channel;
}); });
// file: lib/common/common.js // file: lib/common/common.js
@ -841,7 +857,6 @@ module.exports = {
} }
} }
}; };
}); });
// file: lib/android/exec.js // file: lib/android/exec.js
@ -873,7 +888,8 @@ module.exports = function(success, fail, service, action, args) {
// If a result was returned // If a result was returned
if (r.length > 0) { if (r.length > 0) {
eval("var v="+r+";"); var v;
eval("v="+r+";");
// If status is OK, then return value back to caller // If status is OK, then return value back to caller
if (v.status === cordova.callbackStatus.OK) { if (v.status === cordova.callbackStatus.OK) {
@ -1077,7 +1093,6 @@ module.exports = {
} }
} }
}; };
}); });
// file: lib/common/plugin/Acceleration.js // file: lib/common/plugin/Acceleration.js
@ -1090,7 +1105,6 @@ var Acceleration = function(x, y, z, timestamp) {
}; };
module.exports = Acceleration; module.exports = Acceleration;
}); });
// file: lib/common/plugin/Camera.js // file: lib/common/plugin/Camera.js
@ -1179,28 +1193,27 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
} }
var allowEdit = false; var allowEdit = false;
if (typeof options.allowEdit == "boolean") { if (typeof options.allowEdit == "boolean") {
allowEdit = options.allowEdit; allowEdit = options.allowEdit;
} else if (typeof options.allowEdit == "number") { } else if (typeof options.allowEdit == "number") {
allowEdit = options.allowEdit <= 0 ? false : true; allowEdit = options.allowEdit <= 0 ? false : true;
} }
var correctOrientation = false; var correctOrientation = false;
if (typeof options.correctOrientation == "boolean") { if (typeof options.correctOrientation == "boolean") {
correctOrientation = options.correctOrientation; correctOrientation = options.correctOrientation;
} else if (typeof options.correctOrientation == "number") { } else if (typeof options.correctOrientation == "number") {
correctOrientation = options.correctOrientation <=0 ? false : true; correctOrientation = options.correctOrientation <=0 ? false : true;
} }
var saveToPhotoAlbum = false; var saveToPhotoAlbum = false;
if (typeof options.saveToPhotoAlbum == "boolean") { if (typeof options.saveToPhotoAlbum == "boolean") {
saveToPhotoAlbum = options.saveToPhotoAlbum; saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") { } 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]); exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
} };
module.exports = cameraExport; module.exports = cameraExport;
}); });
// file: lib/common/plugin/CameraConstants.js // file: lib/common/plugin/CameraConstants.js
@ -1225,7 +1238,6 @@ module.exports = {
SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android) SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
} }
}; };
}); });
// file: lib/common/plugin/CaptureAudioOptions.js // 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. * Encapsulates all audio capture operation configuration options.
*/ */
var CaptureAudioOptions = function(){ var CaptureAudioOptions = function(){
// Upper limit of sound clips user can record. Value must be equal or greater than 1. // Upper limit of sound clips user can record. Value must be equal or greater than 1.
this.limit = 1; this.limit = 1;
// Maximum duration of a single sound clip in seconds. // Maximum duration of a single sound clip in seconds.
this.duration = 0; this.duration = 0;
// The selected audio mode. Must match with one of the elements in supportedAudioModes array. // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
this.mode = null; this.mode = null;
}; };
module.exports = CaptureAudioOptions; module.exports = CaptureAudioOptions;
}); });
// file: lib/common/plugin/CaptureError.js // file: lib/common/plugin/CaptureError.js
@ -1267,7 +1278,6 @@ CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
CaptureError.CAPTURE_NOT_SUPPORTED = 20; CaptureError.CAPTURE_NOT_SUPPORTED = 20;
module.exports = CaptureError; module.exports = CaptureError;
}); });
// file: lib/common/plugin/CaptureImageOptions.js // 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. * Encapsulates all image capture operation configuration options.
*/ */
var CaptureImageOptions = function(){ var CaptureImageOptions = function(){
// Upper limit of images user can take. Value must be equal or greater than 1. // Upper limit of images user can take. Value must be equal or greater than 1.
this.limit = 1; this.limit = 1;
// The selected image mode. Must match with one of the elements in supportedImageModes array. // The selected image mode. Must match with one of the elements in supportedImageModes array.
this.mode = null; this.mode = null;
}; };
module.exports = CaptureImageOptions; module.exports = CaptureImageOptions;
}); });
// file: lib/common/plugin/CaptureVideoOptions.js // 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. * Encapsulates all video capture operation configuration options.
*/ */
var CaptureVideoOptions = function(){ var CaptureVideoOptions = function(){
// Upper limit of videos user can record. Value must be equal or greater than 1. // Upper limit of videos user can record. Value must be equal or greater than 1.
this.limit = 1; this.limit = 1;
// Maximum duration of a single video clip in seconds. // Maximum duration of a single video clip in seconds.
this.duration = 0; this.duration = 0;
// The selected video mode. Must match with one of the elements in supportedVideoModes array. // The selected video mode. Must match with one of the elements in supportedVideoModes array.
this.mode = null; this.mode = null;
}; };
module.exports = CaptureVideoOptions; module.exports = CaptureVideoOptions;
}); });
// file: lib/common/plugin/CompassError.js // file: lib/common/plugin/CompassError.js
@ -1319,7 +1327,6 @@ CompassError.COMPASS_INTERNAL_ERR = 0;
CompassError.COMPASS_NOT_SUPPORTED = 20; CompassError.COMPASS_NOT_SUPPORTED = 20;
module.exports = CompassError; module.exports = CompassError;
}); });
// file: lib/common/plugin/CompassHeading.js // file: lib/common/plugin/CompassHeading.js
@ -1332,7 +1339,6 @@ var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, tim
}; };
module.exports = CompassHeading; module.exports = CompassHeading;
}); });
// file: lib/common/plugin/ConfigurationData.js // file: lib/common/plugin/ConfigurationData.js
@ -1352,7 +1358,6 @@ function ConfigurationData() {
} }
module.exports = ConfigurationData; module.exports = ConfigurationData;
}); });
// file: lib/common/plugin/Connection.js // file: lib/common/plugin/Connection.js
@ -1361,15 +1366,14 @@ define("cordova/plugin/Connection", function(require, exports, module) {
* Network status * Network status
*/ */
module.exports = { module.exports = {
UNKNOWN: "unknown", UNKNOWN: "unknown",
ETHERNET: "ethernet", ETHERNET: "ethernet",
WIFI: "wifi", WIFI: "wifi",
CELL_2G: "2g", CELL_2G: "2g",
CELL_3G: "3g", CELL_3G: "3g",
CELL_4G: "4g", CELL_4G: "4g",
NONE: "none" NONE: "none"
}; };
}); });
// file: lib/common/plugin/Contact.js // file: lib/common/plugin/Contact.js
@ -1390,7 +1394,7 @@ function convertIn(contact) {
console.log("Cordova Contact convertIn error: exception creating date."); console.log("Cordova Contact convertIn error: exception creating date.");
} }
return contact; return contact;
}; }
/** /**
* Converts Complex objects into primitives * Converts Complex objects into primitives
@ -1399,7 +1403,7 @@ function convertIn(contact) {
function convertOut(contact) { function convertOut(contact) {
var value = contact.birthday; var value = contact.birthday;
if (value != null) { if (value !== null) {
// try to make it a Date object if it is not already // try to make it a Date object if it is not already
if (!value instanceof Date){ if (!value instanceof Date){
try { try {
@ -1414,7 +1418,7 @@ function convertOut(contact) {
contact.birthday = value; contact.birthday = value;
} }
return contact; return contact;
}; }
/** /**
* Contains information about a single contact. * Contains information about a single contact.
@ -1533,7 +1537,7 @@ Contact.prototype.save = function(successCB, errorCB) {
var fail = function(code) { var fail = function(code) {
errorCB(new ContactError(code)); errorCB(new ContactError(code));
}; };
var success = function(result) { var success = function(result) {
if (result) { if (result) {
if (typeof successCB === 'function') { if (typeof successCB === 'function') {
var fullContact = require('cordova/plugin/contacts').create(result); var fullContact = require('cordova/plugin/contacts').create(result);
@ -1545,13 +1549,12 @@ Contact.prototype.save = function(successCB, errorCB) {
fail(ContactError.UNKNOWN_ERROR); fail(ContactError.UNKNOWN_ERROR);
} }
}; };
var dupContact = convertOut(utils.clone(this)); var dupContact = convertOut(utils.clone(this));
exec(success, fail, "Contacts", "save", [dupContact]); exec(success, fail, "Contacts", "save", [dupContact]);
}; };
module.exports = Contact; module.exports = Contact;
}); });
// file: lib/common/plugin/ContactAddress.js // file: lib/common/plugin/ContactAddress.js
@ -1581,7 +1584,6 @@ var ContactAddress = function(pref, type, formatted, streetAddress, locality, re
}; };
module.exports = ContactAddress; module.exports = ContactAddress;
}); });
// file: lib/common/plugin/ContactError.js // file: lib/common/plugin/ContactError.js
@ -1607,7 +1609,6 @@ ContactError.NOT_SUPPORTED_ERROR = 5;
ContactError.PERMISSION_DENIED_ERROR = 20; ContactError.PERMISSION_DENIED_ERROR = 20;
module.exports = ContactError; module.exports = ContactError;
}); });
// file: lib/common/plugin/ContactField.js // file: lib/common/plugin/ContactField.js
@ -1628,7 +1629,6 @@ var ContactField = function(type, value, pref) {
}; };
module.exports = ContactField; module.exports = ContactField;
}); });
// file: lib/common/plugin/ContactFindOptions.js // file: lib/common/plugin/ContactFindOptions.js
@ -1646,7 +1646,6 @@ var ContactFindOptions = function(filter, multiple) {
}; };
module.exports = ContactFindOptions; module.exports = ContactFindOptions;
}); });
// file: lib/common/plugin/ContactName.js // file: lib/common/plugin/ContactName.js
@ -1671,7 +1670,6 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
}; };
module.exports = ContactName; module.exports = ContactName;
}); });
// file: lib/common/plugin/ContactOrganization.js // file: lib/common/plugin/ContactOrganization.js
@ -1699,7 +1697,6 @@ var ContactOrganization = function(pref, type, name, dept, title) {
}; };
module.exports = ContactOrganization; module.exports = ContactOrganization;
}); });
// file: lib/common/plugin/Coordinates.js // file: lib/common/plugin/Coordinates.js
@ -1747,7 +1744,6 @@ var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
}; };
module.exports = Coordinates; module.exports = Coordinates;
}); });
// file: lib/common/plugin/DirectoryEntry.js // file: lib/common/plugin/DirectoryEntry.js
@ -1755,6 +1751,7 @@ define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
var utils = require('cordova/utils'), var utils = require('cordova/utils'),
exec = require('cordova/exec'), exec = require('cordova/exec'),
Entry = require('cordova/plugin/Entry'), Entry = require('cordova/plugin/Entry'),
FileError = require('cordova/plugin/FileError'),
DirectoryReader = require('cordova/plugin/DirectoryReader'); DirectoryReader = require('cordova/plugin/DirectoryReader');
/** /**
@ -1837,7 +1834,8 @@ module.exports = DirectoryEntry;
// file: lib/common/plugin/DirectoryReader.js // file: lib/common/plugin/DirectoryReader.js
define("cordova/plugin/DirectoryReader", function(require, exports, module) { 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. * 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<result.length; i++) { for (var i=0; i<result.length; i++) {
var entry = null; var entry = null;
if (result[i].isDirectory) { if (result[i].isDirectory) {
entry = new DirectoryEntry(); entry = new (require('cordova/plugin/DirectoryEntry'))();
} }
else if (result[i].isFile) { else if (result[i].isFile) {
entry = new FileEntry(); entry = new (require('cordova/plugin/FileEntry'))();
} }
entry.isDirectory = result[i].isDirectory; entry.isDirectory = result[i].isDirectory;
entry.isFile = result[i].isFile; entry.isFile = result[i].isFile;
@ -2086,7 +2084,6 @@ Entry.prototype.getParent = function(successCallback, errorCallback) {
}; };
module.exports = Entry; module.exports = Entry;
}); });
// file: lib/common/plugin/File.js // file: lib/common/plugin/File.js
@ -2101,15 +2098,14 @@ define("cordova/plugin/File", function(require, exports, module) {
*/ */
var File = function(name, fullPath, type, lastModifiedDate, size){ var File = function(name, fullPath, type, lastModifiedDate, size){
this.name = name || ''; this.name = name || '';
this.fullPath = fullPath || null; this.fullPath = fullPath || null;
this.type = type || null; this.type = type || null;
this.lastModifiedDate = lastModifiedDate || null; this.lastModifiedDate = lastModifiedDate || null;
this.size = size || 0; this.size = size || 0;
}; };
module.exports = File; module.exports = File;
}); });
// file: lib/common/plugin/FileEntry.js // file: lib/common/plugin/FileEntry.js
@ -2177,7 +2173,6 @@ FileEntry.prototype.file = function(successCallback, errorCallback) {
module.exports = FileEntry; module.exports = FileEntry;
}); });
// file: lib/common/plugin/FileError.js // file: lib/common/plugin/FileError.js
@ -2207,7 +2202,6 @@ FileError.TYPE_MISMATCH_ERR = 11;
FileError.PATH_EXISTS_ERR = 12; FileError.PATH_EXISTS_ERR = 12;
module.exports = FileError; module.exports = FileError;
}); });
// file: lib/common/plugin/FileReader.js // file: lib/common/plugin/FileReader.js
@ -2461,7 +2455,6 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
}; };
module.exports = FileReader; module.exports = FileReader;
}); });
// file: lib/common/plugin/FileSystem.js // file: lib/common/plugin/FileSystem.js
@ -2483,7 +2476,6 @@ var FileSystem = function(name, root) {
}; };
module.exports = FileSystem; module.exports = FileSystem;
}); });
// file: lib/common/plugin/FileTransfer.js // file: lib/common/plugin/FileTransfer.js
@ -2542,10 +2534,10 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
var win = function(result) { var win = function(result) {
var entry = null; var entry = null;
if (result.isDirectory) { if (result.isDirectory) {
entry = new DirectoryEntry(); entry = new (require('cordova/plugin/DirectoryEntry'))();
} }
else if (result.isFile) { else if (result.isFile) {
entry = new FileEntry(); entry = new (require('cordova/plugin/FileEntry'))();
} }
entry.isDirectory = result.isDirectory; entry.isDirectory = result.isDirectory;
entry.isFile = result.isFile; entry.isFile = result.isFile;
@ -2575,7 +2567,6 @@ FileTransferError.INVALID_URL_ERR = 2;
FileTransferError.CONNECTION_ERR = 3; FileTransferError.CONNECTION_ERR = 3;
module.exports = FileTransferError; module.exports = FileTransferError;
}); });
// file: lib/common/plugin/FileUploadOptions.js // file: lib/common/plugin/FileUploadOptions.js
@ -2596,7 +2587,6 @@ var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
}; };
module.exports = FileUploadOptions; module.exports = FileUploadOptions;
}); });
// file: lib/common/plugin/FileUploadResult.js // file: lib/common/plugin/FileUploadResult.js
@ -2612,13 +2602,12 @@ var FileUploadResult = function() {
}; };
module.exports = FileUploadResult; module.exports = FileUploadResult;
}); });
// file: lib/common/plugin/FileWriter.js // file: lib/common/plugin/FileWriter.js
define("cordova/plugin/FileWriter", function(require, exports, module) { define("cordova/plugin/FileWriter", function(require, exports, module) {
var exec = require('cordova/exec'), var exec = require('cordova/exec'),
FileError = require('cordova/plugin/FileError'); FileError = require('cordova/plugin/FileError'),
ProgressEvent = require('cordova/plugin/ProgressEvent'); ProgressEvent = require('cordova/plugin/ProgressEvent');
/** /**
@ -2777,7 +2766,7 @@ FileWriter.prototype.seek = function(offset) {
throw new FileError(FileError.INVALID_STATE_ERR); throw new FileError(FileError.INVALID_STATE_ERR);
} }
if (!offset && offset != 0) { if (!offset && offset !== 0) {
return; return;
} }
@ -2890,7 +2879,6 @@ function Flags(create, exclusive) {
} }
module.exports = Flags; module.exports = Flags;
}); });
// file: lib/common/plugin/LocalFileSystem.js // file: lib/common/plugin/LocalFileSystem.js
@ -2908,7 +2896,6 @@ LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
LocalFileSystem.PERSISTENT = 1; //persistent LocalFileSystem.PERSISTENT = 1; //persistent
module.exports = LocalFileSystem; module.exports = LocalFileSystem;
}); });
// file: lib/common/plugin/Media.js // file: lib/common/plugin/Media.js
@ -3090,7 +3077,7 @@ Media.onStatus = function(id, msg, value) {
} }
else if (msg === Media.MEDIA_ERROR) { else if (msg === Media.MEDIA_ERROR) {
if (media.errorCallback) { if (media.errorCallback) {
// value should be a MediaError object when msg == MEDIA_ERROR // value should be a MediaError object when msg == MEDIA_ERROR
media.errorCallback(value); media.errorCallback(value);
} }
} }
@ -3100,7 +3087,6 @@ Media.onStatus = function(id, msg, value) {
}; };
module.exports = Media; module.exports = Media;
}); });
// file: lib/common/plugin/MediaError.js // file: lib/common/plugin/MediaError.js
@ -3121,7 +3107,6 @@ MediaError.MEDIA_ERR_DECODE = 3;
MediaError.MEDIA_ERR_NONE_SUPPORTED = 4; MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
module.exports = MediaError; module.exports = MediaError;
}); });
// file: lib/common/plugin/MediaFile.js // file: lib/common/plugin/MediaFile.js
@ -3152,11 +3137,11 @@ utils.extend(MediaFile, File);
* @param {Function} errorCB * @param {Function} errorCB
*/ */
MediaFile.prototype.getFormatData = function(successCallback, errorCallback) { MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
if (typeof this.fullPath === "undefined" || this.fullPath === null) { if (typeof this.fullPath === "undefined" || this.fullPath === null) {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)); errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
} else { } else {
exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]); exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
} }
}; };
/** /**
@ -3182,7 +3167,6 @@ MediaFile.cast = function(pluginResult) {
}; };
module.exports = MediaFile; module.exports = MediaFile;
}); });
// file: lib/common/plugin/MediaFileData.js // file: lib/common/plugin/MediaFileData.js
@ -3197,15 +3181,14 @@ define("cordova/plugin/MediaFileData", function(require, exports, module) {
* @param {float} duration * @param {float} duration
*/ */
var MediaFileData = function(codecs, bitrate, height, width, duration){ var MediaFileData = function(codecs, bitrate, height, width, duration){
this.codecs = codecs || null; this.codecs = codecs || null;
this.bitrate = bitrate || 0; this.bitrate = bitrate || 0;
this.height = height || 0; this.height = height || 0;
this.width = width || 0; this.width = width || 0;
this.duration = duration || 0; this.duration = duration || 0;
}; };
module.exports = MediaFileData; module.exports = MediaFileData;
}); });
// file: lib/common/plugin/Metadata.js // file: lib/common/plugin/Metadata.js
@ -3220,7 +3203,6 @@ var Metadata = function(time) {
}; };
module.exports = Metadata; module.exports = Metadata;
}); });
// file: lib/common/plugin/Position.js // file: lib/common/plugin/Position.js
@ -3228,12 +3210,11 @@ define("cordova/plugin/Position", function(require, exports, module) {
var Coordinates = require('cordova/plugin/Coordinates'); var Coordinates = require('cordova/plugin/Coordinates');
var Position = function(coords, timestamp) { var Position = function(coords, timestamp) {
this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy); this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime(); this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
}; };
module.exports = Position; module.exports = Position;
}); });
// file: lib/common/plugin/PositionError.js // file: lib/common/plugin/PositionError.js
@ -3255,7 +3236,6 @@ PositionError.POSITION_UNAVAILABLE = 2;
PositionError.TIMEOUT = 3; PositionError.TIMEOUT = 3;
module.exports = PositionError; module.exports = PositionError;
}); });
// file: lib/common/plugin/ProgressEvent.js // file: lib/common/plugin/ProgressEvent.js
@ -3306,7 +3286,6 @@ var ProgressEvent = (function() {
})(); })();
module.exports = ProgressEvent; module.exports = ProgressEvent;
}); });
// file: lib/common/plugin/accelerometer.js // file: lib/common/plugin/accelerometer.js
@ -3406,7 +3385,6 @@ var accelerometer = {
}; };
module.exports = accelerometer; module.exports = accelerometer;
}); });
// file: lib/android/plugin/android/app.js // file: lib/android/plugin/android/app.js
@ -3469,7 +3447,7 @@ module.exports = {
* Note: The user should not have to call this method. Instead, when the user * Note: The user should not have to call this method. Instead, when the user
* registers for the "backbutton" event, this is automatically done. * registers for the "backbutton" event, this is automatically done.
* *
* @param override T=override, F=cancel override * @param override T=override, F=cancel override
*/ */
overrideBackbutton:function(override) { overrideBackbutton:function(override) {
exec(null, null, "App", "overrideBackbutton", [override]); exec(null, null, "App", "overrideBackbutton", [override]);
@ -3482,7 +3460,6 @@ module.exports = {
return exec(null, null, "App", "exitApp", []); return exec(null, null, "App", "exitApp", []);
} }
}; };
}); });
// file: lib/android/plugin/android/callback.js // file: lib/android/plugin/android/callback.js
@ -3572,7 +3549,6 @@ var port = null,
}; };
module.exports = callback; module.exports = callback;
}); });
// file: lib/android/plugin/android/device.js // file: lib/android/plugin/android/device.js
@ -3643,8 +3619,8 @@ Device.prototype.getInfo = function(successCallback, errorCallback) {
* You must explicitly override the back button. * You must explicitly override the back button.
*/ */
Device.prototype.overrideBackButton = function() { Device.prototype.overrideBackButton = function() {
console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true)."); console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true).");
navigator.app.overrideBackbutton(true); navigator.app.overrideBackbutton(true);
}; };
/* /*
@ -3654,8 +3630,8 @@ Device.prototype.overrideBackButton = function() {
* This resets the back button to the default behaviour * This resets the back button to the default behaviour
*/ */
Device.prototype.resetBackButton = function() { Device.prototype.resetBackButton = function() {
console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false)."); console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false).");
navigator.app.overrideBackbutton(false); navigator.app.overrideBackbutton(false);
}; };
/* /*
@ -3665,12 +3641,11 @@ Device.prototype.resetBackButton = function() {
* This terminates the activity! * This terminates the activity!
*/ */
Device.prototype.exitApp = function() { Device.prototype.exitApp = function() {
console.log("Device.exitApp() is deprecated. Use App.exitApp()."); console.log("Device.exitApp() is deprecated. Use App.exitApp().");
navigator.app.exitApp(); navigator.app.exitApp();
}; };
module.exports = new Device(); module.exports = new Device();
}); });
// file: lib/android/plugin/android/notification.js // file: lib/android/plugin/android/notification.js
@ -3726,7 +3701,7 @@ module.exports = {
*/ */
progressValue : function(value) { progressValue : function(value) {
exec(null, null, 'Notification', 'progressValue', [ value ]); exec(null, null, 'Notification', 'progressValue', [ value ]);
}, }
}; };
}); });
@ -3765,13 +3740,12 @@ var cordova = require('cordova'),
}; };
module.exports = polling; module.exports = polling;
}); });
// file: lib/android/plugin/android/storage.js // file: lib/android/plugin/android/storage.js
define("cordova/plugin/android/storage", function(require, exports, module) { define("cordova/plugin/android/storage", function(require, exports, module) {
var utils = require('cordova/utils'), var utils = require('cordova/utils'),
exec = require('cordova/exec'); exec = require('cordova/exec'),
channel = require('cordova/channel'); channel = require('cordova/channel');
var queryQueue = {}; var queryQueue = {};
@ -4077,7 +4051,7 @@ var CupcakeLocalStorage = function() {
transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))'); transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
transaction.executeSql('SELECT * FROM storage', [], function(tx, result) { transaction.executeSql('SELECT * FROM storage', [], function(tx, result) {
for(var i = 0; i < result.rows.length; i++) { for(var i = 0; i < result.rows.length; i++) {
storage[result.rows.item(i)['id']] = result.rows.item(i)['body']; storage[result.rows.item(i).id] = result.rows.item(i).body;
} }
setLength(result.rows.length); setLength(result.rows.length);
channel.initializationComplete("cupcakeStorage"); channel.initializationComplete("cupcakeStorage");
@ -4204,29 +4178,29 @@ Battery.prototype.onUnsubscribe = function() {
/** /**
* Callback for battery status * Callback for battery status
* *
* @param {Object} info keys: level, isPlugged * @param {Object} info keys: level, isPlugged
*/ */
Battery.prototype._status = function(info) { Battery.prototype._status = function(info) {
if (info) { if (info) {
var me = battery; var me = battery;
var level = info.level; var level = info.level;
if (me._level !== level || me._isPlugged !== info.isPlugged) { if (me._level !== level || me._isPlugged !== info.isPlugged) {
// Fire batterystatus event // Fire batterystatus event
cordova.fireWindowEvent("batterystatus", info); cordova.fireWindowEvent("batterystatus", info);
// Fire low battery event // Fire low battery event
if (level === 20 || level === 5) { if (level === 20 || level === 5) {
if (level === 20) { if (level === 20) {
cordova.fireWindowEvent("batterylow", info); cordova.fireWindowEvent("batterylow", info);
} }
else { else {
cordova.fireWindowEvent("batterycritical", info); cordova.fireWindowEvent("batterycritical", info);
} }
} }
} }
me._level = level; me._level = level;
me._isPlugged = info.isPlugged; me._isPlugged = info.isPlugged;
} }
}; };
/** /**
@ -4239,7 +4213,6 @@ Battery.prototype._error = function(e) {
var battery = new Battery(); var battery = new Battery();
module.exports = battery; module.exports = battery;
}); });
// file: lib/common/plugin/capture.js // file: lib/common/plugin/capture.js
@ -4276,9 +4249,9 @@ function _capture(type, successCallback, errorCallback, options) {
* The Capture interface exposes an interface to the camera and microphone of the hosting device. * The Capture interface exposes an interface to the camera and microphone of the hosting device.
*/ */
function Capture() { function Capture() {
this.supportedAudioModes = []; this.supportedAudioModes = [];
this.supportedImageModes = []; this.supportedImageModes = [];
this.supportedVideoModes = []; this.supportedVideoModes = [];
} }
/** /**
@ -4355,7 +4328,7 @@ var exec = require('cordova/exec'),
var fail = function(code) { var fail = function(code) {
var ce = new CompassError(code); var ce = new CompassError(code);
errorCallback(ce); errorCallback(ce);
} };
// Get heading // Get heading
exec(win, fail, "Compass", "getHeading", [options]); exec(win, fail, "Compass", "getHeading", [options]);
@ -4389,16 +4362,16 @@ var exec = require('cordova/exec'),
} }
var id = utils.createUUID(); var id = utils.createUUID();
if (filter > 0) { if (filter > 0) {
// is an iOS request for watch by filter, no timer needed // is an iOS request for watch by filter, no timer needed
timers[id] = "iOS"; timers[id] = "iOS";
compass.getCurrentHeading(successCallback, errorCallback, options); compass.getCurrentHeading(successCallback, errorCallback, options);
} else { } else {
// Start watch timer to get headings // Start watch timer to get headings
timers[id] = window.setInterval(function() { timers[id] = window.setInterval(function() {
compass.getCurrentHeading(successCallback, errorCallback); compass.getCurrentHeading(successCallback, errorCallback);
}, frequency); }, frequency);
} }
return id; return id;
}, },
@ -4410,19 +4383,18 @@ var exec = require('cordova/exec'),
clearWatch:function(id) { clearWatch:function(id) {
// Stop javascript timer & remove from timer list // Stop javascript timer & remove from timer list
if (id && timers[id]) { if (id && timers[id]) {
if (timers[id] != "iOS") { if (timers[id] != "iOS") {
clearInterval(timers[id]); clearInterval(timers[id]);
} else { } else {
// is iOS watch by filter so call into device to stop // is iOS watch by filter so call into device to stop
exec(null, null, "Compass", "stopHeading", []); exec(null, null, "Compass", "stopHeading", []);
} }
delete timers[id]; delete timers[id];
} }
} }
}; };
module.exports = compass; module.exports = compass;
}); });
// file: lib/common/plugin/contacts.js // file: lib/common/plugin/contacts.js
@ -4484,7 +4456,6 @@ var contacts = {
}; };
module.exports = contacts; module.exports = contacts;
}); });
// file: lib/common/plugin/geolocation.js // file: lib/common/plugin/geolocation.js
@ -4583,7 +4554,6 @@ var geolocation = {
}; };
module.exports = geolocation; module.exports = geolocation;
}); });
// file: lib/common/plugin/network.js // file: lib/common/plugin/network.js
@ -4648,7 +4618,6 @@ NetworkConnection.prototype.getInfo = function (successCallback, errorCallback)
}; };
module.exports = new NetworkConnection(); module.exports = new NetworkConnection();
}); });
// file: lib/common/plugin/notification.js // file: lib/common/plugin/notification.js
@ -4709,7 +4678,6 @@ module.exports = {
exec(null, null, "Notification", "beep", [count]); exec(null, null, "Notification", "beep", [count]);
} }
}; };
}); });
// file: lib/common/plugin/requestFileSystem.js // file: lib/common/plugin/requestFileSystem.js
@ -4754,13 +4722,13 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
}; };
module.exports = requestFileSystem; module.exports = requestFileSystem;
}); });
// file: lib/common/plugin/resolveLocalFileSystemURI.js // file: lib/common/plugin/resolveLocalFileSystemURI.js
define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) { define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
var DirectoryEntry = require('cordova/plugin/DirectoryEntry'), var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
FileEntry = require('cordova/plugin/FileEntry'), FileEntry = require('cordova/plugin/FileEntry'),
FileError = require('cordova/plugin/FileError'),
exec = require('cordova/exec'); exec = require('cordova/exec');
/** /**
@ -4909,7 +4877,6 @@ var _self = {
}; };
module.exports = _self; module.exports = _self;
}); });
@ -4920,20 +4887,6 @@ window.cordova = require('cordova');
var channel = require("cordova/channel"), var channel = require("cordova/channel"),
_self = { _self = {
boot: function () { 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. * Create all cordova objects once page has fully loaded and native side is ready.
*/ */
@ -4983,5 +4936,4 @@ window.cordova = require('cordova');
}(window)); }(window));
})(); })();

View File

@ -19,7 +19,7 @@
<html> <html>
<head> <head>
<title></title> <title></title>
<script src="cordova-1.6.1.js"></script> <script src="cordova-1.7.0rc1.js"></script>
</head> </head>
<body> <body>

View File

@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
public class Device extends Plugin { public class Device extends Plugin {
public static final String TAG = "Device"; public static final String TAG = "Device";
public static String cordovaVersion = "1.6.1"; // Cordova version public static String cordovaVersion = "1.7.0rc1"; // Cordova version
public static String platform = "Android"; // Device OS public static String platform = "Android"; // Device OS
public static String uuid; // Device UUID public static String uuid; // Device UUID