1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-29 12:22:22 -05:00

remove old cordova deps

This commit is contained in:
Tankred Hase 2014-02-01 14:43:15 +01:00
parent ada401efa9
commit 3e9eff8085
5 changed files with 11 additions and 6098 deletions

View File

@ -5,11 +5,14 @@
<title>Mail</title> <title>Mail</title>
<!-- Theses CSP rules are used as a fallback in runtimes such as PhoneGap where setting http headers is not possbile. --> <!-- Theses CSP rules are used as a fallback in runtimes such as PhoneGap where setting http headers is not possbile. -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; connect-src 'self' https://keys.whiteout.io; img-src 'self' data:;"> <meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; connect-src 'self' https://keys.whiteout.io https://keys-test.whiteout.io;">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" media="all" href="css/all.min.css" type="text/css"> <link rel="stylesheet" media="all" href="css/all.min.css" type="text/css">
<!-- PhoneGap dependencies -->
<script src="phonegap.js"></script>
<!-- The Scripts --> <!-- The Scripts -->
<script src="lib/require.js"></script> <script src="lib/require.js"></script>
<script src="require-config.js"></script> <script src="require-config.js"></script>

View File

@ -17,7 +17,6 @@ define(function(require) {
OutboxBO = require('js/bo/outbox'), OutboxBO = require('js/bo/outbox'),
PGP = require('js/crypto/pgp'), PGP = require('js/crypto/pgp'),
config = require('js/app-config').config; config = require('js/app-config').config;
require('cordova');
var self = {}; var self = {};
@ -25,13 +24,15 @@ define(function(require) {
* Start the application * Start the application
*/ */
self.start = function(options, callback) { self.start = function(options, callback) {
// are we running in native app or in browser? // are we running in a cordova app or in a browser environment?
if (document.URL.indexOf("http") === 0 || document.URL.indexOf("app") === 0 || document.URL.indexOf("chrome") === 0) { if (window.cordova) {
console.log('Assuming Browser environment...'); // wait for 'deviceready' event to make sure plugins are loaded
onDeviceReady();
} else {
console.log('Assuming Cordova environment...'); console.log('Assuming Cordova environment...');
document.addEventListener("deviceready", onDeviceReady, false); document.addEventListener("deviceready", onDeviceReady, false);
} else {
// No need to wait on events... just start the app
console.log('Assuming Browser environment...');
onDeviceReady();
} }
function onDeviceReady() { function onDeviceReady() {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,6 @@
cryptoLib: '../js/crypto', cryptoLib: '../js/crypto',
'setimmediate': 'setImmediate', 'setimmediate': 'setImmediate',
underscore: 'underscore/underscore-min', underscore: 'underscore/underscore-min',
cordova: 'cordova/cordova-2.5.0',
lawnchair: 'lawnchair/lawnchair-git', lawnchair: 'lawnchair/lawnchair-git',
lawnchairSQL: 'lawnchair/lawnchair-adapter-webkit-sqlite-git', lawnchairSQL: 'lawnchair/lawnchair-adapter-webkit-sqlite-git',
lawnchairIDB: 'lawnchair/lawnchair-adapter-indexed-db-git', lawnchairIDB: 'lawnchair/lawnchair-adapter-indexed-db-git',
@ -18,7 +17,6 @@
angular: 'angular/angular.min', angular: 'angular/angular.min',
angularRoute: 'angular/angular-route.min', angularRoute: 'angular/angular-route.min',
angularTouch: 'angular/angular-touch.min', angularTouch: 'angular/angular-touch.min',
moment: 'moment/moment.min',
uuid: 'uuid/uuid', uuid: 'uuid/uuid',
openpgp: 'openpgp/openpgp.min', openpgp: 'openpgp/openpgp.min',
iscroll: 'iscroll/iscroll-min' iscroll: 'iscroll/iscroll-min'