This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Bug 921828 - (app-menu) [Window Management] Refactor ListMenu…
… and move it to AppWindow + implement System Wide Menu if needed" This reverts commit daa85b7. Reverted due to linter errors.
- Loading branch information
1 parent
5f7002e
commit 1d2eaab
Showing
7 changed files
with
30 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / | ||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ | ||
|
||
'use strict'; | ||
|
||
var ContextMenu = { | ||
init: function cm_init() { | ||
window.addEventListener('mozbrowsercontextmenu', this, true); | ||
}, | ||
|
||
handleEvent: function cm_handleEvent(evt) { | ||
var detail = evt.detail; | ||
if (!detail.contextmenu || detail.contextmenu.items.length == 0) | ||
return; | ||
|
||
var onsuccess = function(action) { | ||
detail.contextMenuItemSelected(action); | ||
}; | ||
|
||
ActionMenu.open(detail.contextmenu.items, '', onsuccess); | ||
evt.preventDefault(); | ||
} | ||
}; | ||
|
||
ContextMenu.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.