cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject cordova-plugin-network-information git commit: Moved browser proxy to src/., This closes #18, closes #22, closes #23, closes #26
Date Tue, 25 Aug 2015 22:42:50 GMT
Repository: cordova-plugin-network-information
Updated Branches:
  refs/heads/master cae65dd09 -> 7caab2543


Moved browser proxy to src/., This closes #18, closes #22, closes #23, closes #26


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/7caab254
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/7caab254
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/7caab254

Branch: refs/heads/master
Commit: 7caab2543ad6b8d167ac37bd83233c2103e4869a
Parents: cae65dd
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Aug 25 15:42:43 2015 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Aug 25 15:42:43 2015 -0700

----------------------------------------------------------------------
 plugin.xml             |  2 +-
 src/browser/network.js | 50 +++++++++++++++++++++++++++++++++++++++++++++
 www/browser/network.js | 50 ---------------------------------------------
 3 files changed, 51 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/7caab254/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9a2f0d3..b3ce104 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -166,7 +166,7 @@ xmlns:android="http://schemas.android.com/apk/res/android"
 
     <!-- browser -->
     <platform name="browser">
-        <js-module src="www/browser/network.js" name="NetworkInfoProxy">
+        <js-module src="src/browser/network.js" name="NetworkInfoProxy">
             <runs/>
         </js-module>
     </platform>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/7caab254/src/browser/network.js
----------------------------------------------------------------------
diff --git a/src/browser/network.js b/src/browser/network.js
new file mode 100644
index 0000000..5769dd9
--- /dev/null
+++ b/src/browser/network.js
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software 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.
+ *
+*/
+
+/*global module, require*/
+
+var cordova = require('cordova'),
+    proxy = require("cordova/exec/proxy"),
+    Connection = require('./Connection');
+
+var type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE;
+
+// Subscribe to 'native' online/offline events
+function onStatusChange(evt) {
+    type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE;
+    // force async
+    setTimeout(function(){
+        cordova.fireDocumentEvent(evt.type);
+    },0);
+}
+
+window.addEventListener('online', onStatusChange);
+window.addEventListener('offline', onStatusChange);
+
+proxy.add("NetworkStatus", {
+    getConnectionInfo:function(cbSuccess) {
+        // force async
+        setTimeout(function(){
+            cbSuccess(type);
+        },0);
+    }
+});
+
+

http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/7caab254/www/browser/network.js
----------------------------------------------------------------------
diff --git a/www/browser/network.js b/www/browser/network.js
deleted file mode 100644
index 5769dd9..0000000
--- a/www/browser/network.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software 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.
- *
-*/
-
-/*global module, require*/
-
-var cordova = require('cordova'),
-    proxy = require("cordova/exec/proxy"),
-    Connection = require('./Connection');
-
-var type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE;
-
-// Subscribe to 'native' online/offline events
-function onStatusChange(evt) {
-    type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE;
-    // force async
-    setTimeout(function(){
-        cordova.fireDocumentEvent(evt.type);
-    },0);
-}
-
-window.addEventListener('online', onStatusChange);
-window.addEventListener('offline', onStatusChange);
-
-proxy.add("NetworkStatus", {
-    getConnectionInfo:function(cbSuccess) {
-        // force async
-        setTimeout(function(){
-            cbSuccess(type);
-        },0);
-    }
-});
-
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message