cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hermw...@apache.org
Subject [1/2] js commit: Added support for the App-Menu (mapped to menubutton)
Date Tue, 15 Jan 2013 20:25:25 GMT
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 <mleut@yahoo.com>
Authored: Tue Jan 8 13:22:56 2013 +0100
Committer: hermwong <herm.wong@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;
             };


Mime
View raw message