You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/01/15 21:25:25 UTC

[1/2] js commit: Added support for the App-Menu (mapped to menubutton)

Added support for the App-Menu (mapped to menubutton)


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

Branch: refs/heads/master
Commit: 2328dfd11533665b4f44f1806ce2d103342a5f00
Parents: 099a51d
Author: Markus Leutwyler <ml...@yahoo.com>
Authored: Tue Jan 8 13:22:56 2013 +0100
Committer: hermwong <he...@gmail.com>
Committed: Mon Jan 14 16:42:29 2013 -0800

----------------------------------------------------------------------
 lib/webos/platform.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2328dfd1/lib/webos/platform.js
----------------------------------------------------------------------
diff --git a/lib/webos/platform.js b/lib/webos/platform.js
index e69020b..cb0d7e5 100644
--- a/lib/webos/platform.js
+++ b/lib/webos/platform.js
@@ -58,6 +58,14 @@ module.exports = {
                 // need to return true to tell sysmgr the relaunch succeeded.
                 // otherwise, it'll try to focus the app, which will focus the first
                 // opened window of an app with multiple windows.
+
+                var lp=JSON.parse(PalmSystem.launchParams) || {};
+
+                if (lp['palm-command'] && lp['palm-command'] == 'open-app-menu') {
+                    console.log("event:ToggleAppMenu");
+                    cordova.fireDocumentEvent("menubutton");
+                }
+                
                 console.log("relaunch");
                 return true;
             };