You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/06/17 21:08:15 UTC
android commit: updated cordova.js to remove dependency on network
status plugin.
Updated Branches:
refs/heads/3.0.0 5ee178789 -> 2e5b6bce5
updated cordova.js to remove dependency on network status plugin.
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/2e5b6bce
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/2e5b6bce
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/2e5b6bce
Branch: refs/heads/3.0.0
Commit: 2e5b6bce556e4cefe666d5374f952891611e083e
Parents: 5ee1787
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Jun 17 12:08:10 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Jun 17 12:08:10 2013 -0700
----------------------------------------------------------------------
framework/assets/www/cordova.js | 111 +----------------------------------
1 file changed, 2 insertions(+), 109 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2e5b6bce/framework/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/framework/assets/www/cordova.js b/framework/assets/www/cordova.js
index f8667e5..1a29601 100644
--- a/framework/assets/www/cordova.js
+++ b/framework/assets/www/cordova.js
@@ -1,5 +1,5 @@
// Platform: android
-// 2.7.0rc1-116-gf0108ae
+// 2.7.0rc1-117-g208b97a
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-116-gf0108ae';
+var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-117-g208b97a';
// file: lib/scripts/require.js
var require,
@@ -731,9 +731,6 @@ channel.createSticky('onCordovaReady');
// Event to indicate that device properties are available
channel.createSticky('onCordovaInfoReady');
-// Event to indicate that the connection property has been set.
-channel.createSticky('onCordovaConnectionReady');
-
// Event to indicate that all automatically loaded JS plugins are loaded and ready.
channel.createSticky('onPluginsReady');
@@ -751,7 +748,6 @@ channel.createSticky('onDestroy');
// Channels that must fire before "deviceready" is fired.
channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
channel.waitForInitialization('onDOMContentLoaded');
module.exports = channel;
@@ -1254,25 +1250,6 @@ module.exports = ConfigurationData;
});
-// file: lib/common/plugin/Connection.js
-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",
- CELL:"cellular",
- NONE: "none"
-};
-
-});
-
// file: lib/common/plugin/DirectoryEntry.js
define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
@@ -4361,90 +4338,6 @@ modulemapper.clobbers('cordova/plugin/MediaError', 'MediaError');
});
-// file: lib/common/plugin/network.js
-define("cordova/plugin/network", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
- cordova = require('cordova'),
- channel = require('cordova/channel'),
- utils = require('cordova/utils');
-
-// Link the onLine property with the Cordova-supplied network info.
-// This works because we clobber the naviagtor object with our own
-// object in bootstrap.js.
-if (typeof navigator != 'undefined') {
- utils.defineGetter(navigator, 'onLine', function() {
- return this.connection.type != 'none';
- });
-}
-
-function NetworkConnection() {
- this.type = 'unknown';
-}
-
-/**
- * Get connection info
- *
- * @param {Function} successCallback The function to call when the Connection data is available
- * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
- */
-NetworkConnection.prototype.getInfo = function(successCallback, errorCallback) {
- exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []);
-};
-
-var me = new NetworkConnection();
-var timerId = null;
-var timeout = 500;
-
-channel.onCordovaReady.subscribe(function() {
- me.getInfo(function(info) {
- me.type = info;
- if (info === "none") {
- // set a timer if still offline at the end of timer send the offline event
- timerId = setTimeout(function(){
- cordova.fireDocumentEvent("offline");
- timerId = null;
- }, timeout);
- } else {
- // If there is a current offline event pending clear it
- if (timerId !== null) {
- clearTimeout(timerId);
- timerId = null;
- }
- cordova.fireDocumentEvent("online");
- }
-
- // should only fire this once
- if (channel.onCordovaConnectionReady.state !== 2) {
- channel.onCordovaConnectionReady.fire();
- }
- },
- function (e) {
- // If we can't get the network info we should still tell Cordova
- // to fire the deviceready event.
- if (channel.onCordovaConnectionReady.state !== 2) {
- channel.onCordovaConnectionReady.fire();
- }
- console.log("Error initializing Network Connection: " + e);
- });
-});
-
-module.exports = me;
-
-});
-
-// file: lib/common/plugin/networkstatus/symbols.js
-define("cordova/plugin/networkstatus/symbols", function(require, exports, module) {
-
-
-var modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/network', 'navigator.network.connection', 'navigator.network.connection is deprecated. Use navigator.connection instead.');
-modulemapper.clobbers('cordova/plugin/network', 'navigator.connection');
-modulemapper.defaults('cordova/plugin/Connection', 'Connection');
-
-});
-
// file: lib/common/plugin/requestFileSystem.js
define("cordova/plugin/requestFileSystem", function(require, exports, module) {