You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/06/20 23:34:44 UTC

[29/35] ios commit: updated js

updated js


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/57dbc0a9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/57dbc0a9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/57dbc0a9

Branch: refs/heads/3.0.0
Commit: 57dbc0a9f96d2b54ddb8aad7e0d2d7739dbaccae
Parents: 43d748c
Author: Steven Gill <st...@gmail.com>
Authored: Mon Jun 17 17:05:59 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Jun 20 14:31:33 2013 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVURLProtocol.m |   3 +-
 CordovaLib/cordova.js               | 186 ++-----------------------------
 2 files changed, 10 insertions(+), 179 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57dbc0a9/CordovaLib/Classes/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVURLProtocol.m b/CordovaLib/Classes/CDVURLProtocol.m
index afc10de..3c85f34 100644
--- a/CordovaLib/Classes/CDVURLProtocol.m
+++ b/CordovaLib/Classes/CDVURLProtocol.m
@@ -25,7 +25,6 @@
 #import "CDVCommandQueue.h"
 #import "CDVWhitelist.h"
 #import "CDVViewController.h"
-#import "CDVFile.h"
 
 @interface CDVHTTPURLResponse : NSHTTPURLResponse
 @property (nonatomic) NSInteger statusCode;
@@ -36,6 +35,8 @@ static CDVWhitelist* gWhitelist = nil;
 // the actual pointer to avoid retaining.
 static NSMutableSet* gRegisteredControllers = nil;
 
+NSString* const kCDVAssetsLibraryPrefix = @"assets-library://";
+
 // Returns the registered view controller that sent the given request.
 // If the user-agent is not from a UIWebView, or if it's from an unregistered one,
 // then nil is returned.

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/57dbc0a9/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index e8bc477..1690aba 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -3,6 +3,7 @@
 <<<<<<< HEAD
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 // 2.9.0rc1-0-g002f33d
 =======
 // 2.7.0rc1-84-g62c5786
@@ -16,6 +17,9 @@
 =======
 // 2.7.0rc1-116-gf0108ae
 >>>>>>> updated cordovajs
+=======
+// 2.7.0rc1-119-gf0251c4
+>>>>>>> updated js
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -39,6 +43,7 @@
 <<<<<<< HEAD
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 var CORDOVA_JS_BUILD_LABEL = '2.9.0rc1-0-g002f33d';
 =======
 var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-84-g62c5786';
@@ -52,6 +57,9 @@ var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-101-gc6482ac';
 =======
 var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-116-gf0108ae';
 >>>>>>> updated cordovajs
+=======
+var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-119-gf0251c4';
+>>>>>>> updated js
 // file: lib/scripts/require.js
 
 var require,
@@ -763,9 +771,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');
 
@@ -783,7 +788,6 @@ channel.createSticky('onDestroy');
 
 // Channels that must fire before "deviceready" is fired.
 channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onCordovaConnectionReady');
 channel.waitForInitialization('onDOMContentLoaded');
 
 module.exports = channel;
@@ -1272,25 +1276,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) {
 
@@ -3386,77 +3371,6 @@ for (var key in console) {
 
 });
 
-// file: lib/common/plugin/device.js
-define("cordova/plugin/device", function(require, exports, module) {
-
-var argscheck = require('cordova/argscheck'),
-    channel = require('cordova/channel'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec');
-
-// Tell cordova channel to wait on the CordovaInfoReady event
-channel.waitForInitialization('onCordovaInfoReady');
-
-/**
- * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-function Device() {
-    this.available = false;
-    this.platform = null;
-    this.version = null;
-    this.uuid = null;
-    this.cordova = null;
-    this.model = null;
-
-    var me = this;
-
-    channel.onCordovaReady.subscribe(function() {
-        me.getInfo(function(info) {
-            var buildLabel = info.cordova;
-            if (buildLabel != CORDOVA_JS_BUILD_LABEL) {
-                buildLabel += ' JS=' + CORDOVA_JS_BUILD_LABEL;
-            }
-            me.available = true;
-            me.platform = info.platform;
-            me.version = info.version;
-            me.uuid = info.uuid;
-            me.cordova = buildLabel;
-            me.model = info.model;
-            channel.onCordovaInfoReady.fire();
-        },function(e) {
-            me.available = false;
-            utils.alert("[ERROR] Error initializing Cordova: " + e);
-        });
-    });
-}
-
-/**
- * Get device info
- *
- * @param {Function} successCallback The function to call when the heading data is available
- * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
- */
-Device.prototype.getInfo = function(successCallback, errorCallback) {
-    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
-    exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
-};
-
-module.exports = new Device();
-
-});
-
-// file: lib/common/plugin/device/symbols.js
-define("cordova/plugin/device/symbols", function(require, exports, module) {
-
-
-var modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/device', 'device');
-
-});
-
 // file: lib/common/plugin/echo.js
 define("cordova/plugin/echo", function(require, exports, module) {
 
@@ -3930,90 +3844,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) {