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/09/14 03:03:07 UTC
git commit: updated to work with ffos commandProxy
Updated Branches:
refs/heads/dev 0068a69f0 -> cd25c12bb
updated to work with ffos commandProxy
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/cd25c12b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/cd25c12b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/cd25c12b
Branch: refs/heads/dev
Commit: cd25c12bbaf24d013a7241a159e4ed646a1d7b64
Parents: 0068a69
Author: Steven Gill <st...@gmail.com>
Authored: Fri Sep 13 18:02:59 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Fri Sep 13 18:02:59 2013 -0700
----------------------------------------------------------------------
plugin.xml | 2 +-
src/firefoxos/VibrationProxy.js | 35 +++++++++++++++++++++++++++++++++++
src/firefoxos/vibration.js | 35 -----------------------------------
3 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/cd25c12b/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 0512da5..270125b 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,7 +20,7 @@
<param name="firefoxos-package" value="Vibration" />
</feature>
</config-file>
- <js-module src="src/firefoxos/vibration.js" name="vibration-impl">
+ <js-module src="src/firefoxos/VibrationProxy.js" name="VibrationProxy">
<runs />
</js-module>
</platform>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/cd25c12b/src/firefoxos/VibrationProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/VibrationProxy.js b/src/firefoxos/VibrationProxy.js
new file mode 100644
index 0000000..2084de7
--- /dev/null
+++ b/src/firefoxos/VibrationProxy.js
@@ -0,0 +1,35 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var cordova = require('cordova');
+
+module.exports = {
+
+ vibrate: function(success, fail, milliseconds) {
+ if (navigator.notification.vibrate) {
+ navigator.vibrate(milliseconds);
+ } else {
+ console.log ("cordova/plugin/firefoxos/vibration, vibrate API does not exist");
+ }
+ }
+};
+
+require("cordova/firefoxos/commandProxy").add("Vibration", module.exports);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/cd25c12b/src/firefoxos/vibration.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/vibration.js b/src/firefoxos/vibration.js
deleted file mode 100644
index 4dcaa26..0000000
--- a/src/firefoxos/vibration.js
+++ /dev/null
@@ -1,35 +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.
- *
-*/
-
-var firefoxos = require('cordova/platform');
-
-var Vibration = {
-
- vibrate: function(success, fail, milliseconds) {
- if (navigator.notification.vibrate) {
- navigator.vibrate(milliseconds);
- } else {
- console.log ("cordova/plugin/firefoxos/vibration, vibrate API does not exist");
- }
- }
-};
-
-firefoxos.registerPlugin('Vibration', Vibration);
\ No newline at end of file