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/12/05 01:58:02 UTC
[6/8] git commit: added ubuntu support
added ubuntu support
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/c7a4d238
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/c7a4d238
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/c7a4d238
Branch: refs/heads/master
Commit: c7a4d238d96352203c22d31fe1b999fd0d8bf32c
Parents: 312113a bb8b9e5
Author: Steven Gill <st...@gmail.com>
Authored: Mon Dec 2 16:04:32 2013 -0800
Committer: Steven Gill <st...@gmail.com>
Committed: Mon Dec 2 16:04:32 2013 -0800
----------------------------------------------------------------------
plugin.xml | 7 ++++
src/ubuntu/notification.cpp | 81 ++++++++++++++++++++++++++++++++++++++++
src/ubuntu/notification.h | 63 +++++++++++++++++++++++++++++++
src/ubuntu/notification.qml | 44 ++++++++++++++++++++++
www/notification.js | 3 +-
5 files changed, 197 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/c7a4d238/plugin.xml
----------------------------------------------------------------------
diff --cc plugin.xml
index fa41ffd,bed074c..8cf2f25
--- a/plugin.xml
+++ b/plugin.xml
@@@ -51,24 -29,14 +51,31 @@@
</js-module>
</platform>
+
+ <!-- amazon-fireos -->
+ <platform name="amazon-fireos">
+ <config-file target="res/xml/config.xml" parent="/*">
+ <feature name="Notification">
+ <param name="android-package" value="org.apache.cordova.dialogs.Notification"/>
+ </feature>
+ </config-file>
+
+ <source-file src="src/android/Notification.java" target-dir="src/org/apache/cordova/dialogs" />
+
+ <!-- android specific notification apis -->
+ <js-module src="www/android/notification.js" name="notification_android">
+ <merges target="navigator.notification" />
+ </js-module>
+
+ </platform>
+ <!-- ubuntu -->
+ <platform name="ubuntu">
+ <header-file src="src/ubuntu/notification.h" />
+ <source-file src="src/ubuntu/notification.cpp" />
+ <resource-file src="src/ubuntu/notification.qml" />
+ </platform>
+
<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/c7a4d238/www/notification.js
----------------------------------------------------------------------
diff --cc www/notification.js
index ae4e77d,1c2c191..fb1db3a
--- a/www/notification.js
+++ b/www/notification.js
@@@ -63,7 -63,7 +63,8 @@@ module.exports =
// Some platforms take an array of button label names.
// Other platforms take a comma separated list.
// For compatibility, we convert to the desired type based on the platform.
- if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "firefoxos") {
- if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "ubuntu") {
++ if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu") {
++
if (typeof _buttonLabels === 'string') {
var buttonLabelString = _buttonLabels;
_buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here