cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [17/50] js commit: initial commit for firefoxos
Date Tue, 12 Feb 2013 19:33:07 GMT
initial commit for firefoxos


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/41c63c9e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/41c63c9e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/41c63c9e

Branch: refs/heads/symbolmapping
Commit: 41c63c9ea31cc1a501a849e84cd0a8b7c7b3201a
Parents: 5ec7041
Author: hermwong <herm.wong@gmail.com>
Authored: Tue Feb 5 12:55:20 2013 -0800
Committer: hermwong <herm.wong@gmail.com>
Committed: Mon Feb 11 14:53:02 2013 -0800

----------------------------------------------------------------------
 lib/firefoxos/exec.js                          |    1 -
 lib/firefoxos/platform.js                      |    2 +-
 lib/firefoxos/plugin/firefoxos/notification.js |   34 +++++++++++++++++++
 lib/firefoxos/plugin/firefoxos/orientation.js  |   31 +++++++++++++++++
 4 files changed, 66 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/41c63c9e/lib/firefoxos/exec.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/exec.js b/lib/firefoxos/exec.js
index 82ef415..1796db3 100644
--- a/lib/firefoxos/exec.js
+++ b/lib/firefoxos/exec.js
@@ -53,4 +53,3 @@ module.exports = function(success, fail, service, action, args) {
         console.error(e.stack);
     }
 };
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/41c63c9e/lib/firefoxos/platform.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/platform.js b/lib/firefoxos/platform.js
index 05f9b8b..4c2f67b 100644
--- a/lib/firefoxos/platform.js
+++ b/lib/firefoxos/platform.js
@@ -23,4 +23,4 @@ module.exports = {
     id: "firefoxos",
     initialize: function() {
     }
-};
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/41c63c9e/lib/firefoxos/plugin/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/notification.js b/lib/firefoxos/plugin/firefoxos/notification.js
new file mode 100644
index 0000000..ec8760d
--- /dev/null
+++ b/lib/firefoxos/plugin/firefoxos/notification.js
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+module.exports = {
+
+    vibrate: function(milliseconds) {
+        console.log ("milliseconds" , milliseconds);
+
+        if (navigator.vibrate) {
+            navigator.vibrate(milliseconds);
+        } else {
+            console.log ("cordova/plugin/firefoxos/notification, vibrate API does not exist");
+        }
+    }
+    
+};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/41c63c9e/lib/firefoxos/plugin/firefoxos/orientation.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/orientation.js b/lib/firefoxos/plugin/firefoxos/orientation.js
new file mode 100644
index 0000000..17e07b3
--- /dev/null
+++ b/lib/firefoxos/plugin/firefoxos/orientation.js
@@ -0,0 +1,31 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+// user must have event listener registered for orientation to work
+// window.addEventListener("orientationchange", onorientationchange, true);
+
+module.exports = {
+
+    getCurrentOrientation: function() {
+          return window.screen.orientation;
+    }
+    
+};


Mime
View raw message