You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2015/02/24 16:58:39 UTC

[1/2] cordova-lib git commit: CB-8448 add support for activities

Repository: cordova-lib
Updated Branches:
  refs/heads/master 32863b58d -> d52840b6b


CB-8448 add support for activities


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/7371adbd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/7371adbd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/7371adbd

Branch: refs/heads/master
Commit: 7371adbd9fcb84402d69ea552242a3a44d847353
Parents: a506acd
Author: Axel Nennker <ax...@nennker.de>
Authored: Mon Feb 23 18:56:42 2015 +0100
Committer: Axel Nennker <ax...@nennker.de>
Committed: Mon Feb 23 18:56:42 2015 +0100

----------------------------------------------------------------------
 .../src/cordova/metadata/firefoxos_parser.js    | 40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/7371adbd/cordova-lib/src/cordova/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/firefoxos_parser.js b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
index 2da6e8d..d60a949 100644
--- a/cordova-lib/src/cordova/metadata/firefoxos_parser.js
+++ b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
@@ -82,6 +82,46 @@ firefoxos_parser.prototype.update_from_config = function(config) {
         manifest.fullscreen = fullScreen;
     }
 
+    var activitiesNodes = config.doc.findall('activities');
+    activitiesNodes.forEach(function(activitiesNode) {
+        var activityNodes = activitiesNode.findall('activity');
+        if (activityNodes.length) {
+            var activities = {};
+            activityNodes.forEach(function (node) {
+                var name = node.attrib.name;
+                var href = node.attrib.href;
+                if (name && href) {
+                    events.emit('verbose', 'activity name='+name+' href='+href);
+                    activities[name] = {};
+                    activities[name].href = href;
+                    var returnValue = node.attrib.returnValue;
+                    if (returnValue) {
+                        activities[name].returnValue = returnValue;
+                    }
+                    var disposition = node.attrib.disposition;
+                    if (disposition) {
+                        activities[name].disposition = disposition;
+                    }
+                    activities[name].filters = {};
+                    var filterNodes = node.findall('filter');
+                    filterNodes.forEach(function(filter) {
+                        var url = filter.attrib.url;
+                        if (url) {
+                            activities[name].filters.url = url;
+                        }
+                        var type = filter.attrib.type;
+                        if (type) {
+                            activities[name].filters.type = type;
+                        }
+                    });
+                } else {
+                    events.emit('warn', 'activity without name='+name+'or href='+href);
+                }
+            });
+            manifest.activities = activities;
+        }
+    });
+
     // Set orientation preference
     var orientation = this.helper.getOrientation(config);
 


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


[2/2] cordova-lib git commit: Merge branch 'master' of github.com:AxelNennker/cordova-lib

Posted by za...@apache.org.
Merge branch 'master' of github.com:AxelNennker/cordova-lib


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

Branch: refs/heads/master
Commit: d52840b6bbb0a229b27b051ceab3cf31512bf5a8
Parents: 32863b5 7371adb
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Tue Feb 24 16:56:50 2015 +0100
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Tue Feb 24 16:56:50 2015 +0100

----------------------------------------------------------------------
 .../src/cordova/metadata/firefoxos_parser.js    | 40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------



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