From 655c58be91af592187f07af6656814ae11d8d40f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 5 Mar 2016 02:15:11 +0300 Subject: [PATCH] added menu on context menu on status indicators in status bar + minor fixes... Signed-off-by: Alex A. Naanou --- ui (gen4)/css/widget/overlay.css | 3 +++ ui (gen4)/features/ui-status.js | 9 +++++++++ ui (gen4)/lib/widget/overlay.js | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/ui (gen4)/css/widget/overlay.css b/ui (gen4)/css/widget/overlay.css index 5f37fa18..367ac7f2 100755 --- a/ui (gen4)/css/widget/overlay.css +++ b/ui (gen4)/css/widget/overlay.css @@ -14,6 +14,9 @@ -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; + + /* XXX try to avoid this... */ + z-index: 9999; } .overlay-widget~.overlay-widget { background: rgba(0, 0, 0, 0.3); diff --git a/ui (gen4)/features/ui-status.js b/ui (gen4)/features/ui-status.js index 09f96b0b..1e53f61c 100755 --- a/ui (gen4)/features/ui-status.js +++ b/ui (gen4)/features/ui-status.js @@ -167,6 +167,7 @@ var StatusBarActions = actions.Actions({ }, path: 'gid', + // XXX show menu in the appropriate corner... mark: function(item, gid, img){ gid = gid || this.current var that = this @@ -181,6 +182,14 @@ var StatusBarActions = actions.Actions({ .click(function(){ that['toggle'+type.capitalize()]() }) + // toggle action menu... + // XXX show this in the appropriate corner... + .on('contextmenu', function(){ + event.preventDefault() + event.stopPropagation() + + that.browseActions('/'+ type.capitalize() +'/') + }) } else { var type = item.attr('type') diff --git a/ui (gen4)/lib/widget/overlay.js b/ui (gen4)/lib/widget/overlay.js index ae1d1221..a891c34d 100755 --- a/ui (gen4)/lib/widget/overlay.js +++ b/ui (gen4)/lib/widget/overlay.js @@ -28,6 +28,11 @@ var OverlayClassPrototype = { .click(function(){ event.stopPropagation() }) + .on('contextmenu', function(){ + event.preventDefault() + event.stopPropagation() + return false + }) .append(client)) if(options.focusable){